运行 ID: 41088

Main.cc: In function ‘int main()’:
Main.cc:7:23: error: expected primary-expression before ‘;’ token
     for(int i=10;i<=n;;i++){
                       ^
Main.cc:7:23: error: expected ‘)’ before ‘;’ token
Main.cc:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
     for(int i=10;i<=n;;i++){
     ^~~
Main.cc:7:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
     for(int i=10;i<=n;;i++){
                        ^
Main.cc:7:24: error: ‘i’ was not declared in this scope
Main.cc:4:11: warning: unused variable ‘a’ [-Wunused-variable]
     int n,a[10];
           ^
Main.cc:5:9: warning: unused variable ‘cnt’ [-Wunused-variable]
     int cnt=0,ans=0;
         ^~~