foo.c: In function 'main':
foo.c:8:16: warning: statement with no effect [-Wunused-value]
for (i=0;i<n;i+1){
~^~
foo.c:13:11: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
printf("%f",S);
~^
%d
foo.c:11:9: warning: variable 'A' set but not used [-Wunused-but-set-variable]
double A=0;
^
foo.c:4:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&N);
^~~~~~~~~~~~~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务