foo.c: In function 'main':
foo.c:27:11: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
27 | sum=sum+abs(a[i]-aveg);
| ^~~
foo.c:27:19: warning: 'abs' argument 1 promotes to 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
27 | sum=sum+abs(a[i]-aveg);
| ~~~~^~~~~
<built-in>: note: built-in 'abs' declared here
foo.c:7:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
foo.c:10:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
10 | scanf("%d",&a[i]);
| ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务