foo.cc: In function 'int main()':
foo.cc:5:10: warning: variable 'j' set but not used [-Wunused-but-set-variable]
int m,i,j,k=1,n;
^
foo.cc: At global scope:
foo.cc:24:1: error: expected unqualified-id before 'for'
for(i=1;i<=n;i++)
^~~
foo.cc:24:9: error: 'i' does not name a type
for(i=1;i<=n;i++)
^
foo.cc:24:14: error: 'i' does not name a type
for(i=1;i<=n;i++)
^
foo.cc:25:9: error: 'j' does not name a type
for(j=1;j<=n;j++)
^
foo.cc:25:14: error: 'j' does not name a type
for(j=1;j<=n;j++)
^
foo.cc:27:1: error: 'cout' does not name a type; did you mean 'cosl'?
cout<<endl;
^~~~
cosl
foo.cc:30:1: error: expected unqualified-id before 'for'
for(i=2;i<=n;i++)
^~~
foo.cc:30:9: error: 'i' does not name a type
for(i=2;i<=n;i++)
^
foo.cc:30:14: error: 'i' does not name a type
for(i=2;i<=n;i++)
^
foo.cc:35:1: error: 'k' does not name a type
k=k+1;
^
foo.cc:36:1: error: expected declaration before '}' token
}
^
[Hydro](https://hydro.ac)提供评测服务