foo.cc: In function ‘int main()’:
foo.cc:6:28: error: ‘n’ was not declared in this scope
6 | for(int i=1;i++;i<=n;i++)
| ^
foo.cc:6:29: error: expected ‘)’ before ‘;’ token
6 | for(int i=1;i++;i<=n;i++)
| ~ ^
| )
foo.cc:6:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
6 | for(int i=1;i++;i<=n;i++)
| ^~~
foo.cc:6:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
6 | for(int i=1;i++;i<=n;i++)
| ^
foo.cc:6:30: error: ‘i’ was not declared in this scope
foo.cc:11:36: error: expected ‘;’ before ‘return’
11 | cout<<a[0]/2+min(a[1],a[2])
| ^
| ;
12 | return 0;
| ~~~~~~