foo.cc: In function 'int main()':
foo.cc:9:11: warning: right operand of comma operator has no effect [-Wunused-value]
9 | for(i=2,i<n,i++)
| ~^~
foo.cc:9:17: error: expected ';' before ')' token
9 | for(i=2,i<n,i++)
| ^
| ;
foo.cc:16:2: error: expected primary-expression before 'if'
16 | if(i==n)
| ^~
foo.cc:15:3: error: expected ';' before 'if'
15 | }
| ^
| ;
16 | if(i==n)
| ~~
foo.cc:16:2: error: expected primary-expression before 'if'
16 | if(i==n)
| ^~
foo.cc:15:3: error: expected ')' before 'if'
15 | }
| ^
| )
16 | if(i==n)
| ~~
foo.cc:9:5: note: to match this '('
9 | for(i=2,i<n,i++)
| ^
[Hydro](https://hydro.ac)提供评测服务