foo.cc: In function 'int main()':
foo.cc:6:19: error: 'b' was not declared in this scope
6 | int a = 1;b = 1;
| ^
foo.cc:9:13: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
9 | if (k <= 2) (
| ^
foo.cc:9:18: error: unable to find numeric literal operator 'operator""\U0000ff09'
9 | if (k <= 2) (
| ^~~
foo.cc:9:18: note: use '-fext-numeric-literals' to enable more built-in suffixes
foo.cc:11:9: error: expected primary-expression before 'return'
11 | return 0;
| ^~~~~~
foo.cc:10:21: error: expected ')' before 'return'
10 | printf("1");
| ^
| )
11 | return 0;
| ~~~~~~
foo.cc:9:12: note: to match this '('
9 | if (k <= 2) (
| ^
foo.cc:15:22: error: expected ')' before ';' token
15 | c=a+b;
| ^
| )
foo.cc:14:38: note: to match this '('
14 | for (int i = 3; i <= k; i++) (
| ^
foo.cc:19:22: error: 'c' was not declared in this scope
19 | printf("%d", c);
| ^
[Hydro](https://hydro.ac)提供评测服务