foo.cc: In function 'int main()':
foo.cc:9:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(i=0;i<n;i++)
^~~
foo.cc:13:10: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
a[j]=a[j+1];
^
foo.cc:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
foo.cc:13:18: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
a[j]=a[j+1];
~^~
foo.cc:14:16: warning: 'temp' may be used uninitialized in this function [-Wmaybe-uninitialized]
a[j+1]=temp;
~~~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务