foo.cc: In function 'int main()':
foo.cc:11:10: warning: unused variable 'n' [-Wunused-variable]
int i,n,max=100,min=0,sum=0;
^
foo.cc:15:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
foo.cc:16:15: warning: iteration 9 invokes undefined behavior [-Waggressive-loop-optimizations]
if(max>a[i])
~~~^
foo.cc:13:13: note: within this loop
for(i=1;i<=10;i++)
~^~~~
[Hydro](https://hydro.ac)提供评测服务