foo.cc: In function 'int main()':
foo.cc:38:12: error: expected ';' before ')' token
38 | for (--n)
| ^
| ;
foo.cc:45:4: error: expected primary-expression before 'return'
45 | return 0;
| ^~~~~~
foo.cc:44:20: error: expected ')' before 'return'
44 | printf("%d", a);
| ^
| )
45 | return 0;
| ~~~~~~
foo.cc:38:8: note: to match this '('
38 | for (--n)
| ^
foo.cc:35:14: warning: unused variable 'b' [-Wunused-variable]
35 | int n, a, b;
| ^
foo.cc:36:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
36 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
foo.cc:37:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
37 | scanf("%d", &a);
| ~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务