foo.cc: In function 'int myd(int)':
foo.cc:13:17: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
13 | else if((m==4||m==6||m==9||m==11)
| ^
foo.cc:13:42: error: expected ';' before 'return'
13 | else if((m==4||m==6||m==9||m==11)
| ^
| ;
14 | return 30;
| ~~~~~~
foo.cc:13:34: warning: statement has no effect [-Wunused-value]
13 | else if((m==4||m==6||m==9||m==11)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:15:9: error: expected primary-expression before 'else'
15 | else
| ^~~~
foo.cc:14:27: error: expected ')' before 'else'
14 | return 30;
| ^
| )
15 | else
| ~~~~
foo.cc:13:16: note: to match this '('
13 | else if((m==4||m==6||m==9||m==11)
| ^
foo.cc: In function 'int main()':
foo.cc:25:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
25 | ans+=myd(m2)+1;
| ^~~
| abs
foo.cc:27:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
27 | ans+=myd(m2);
| ^~~
| abs
foo.cc:32:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
32 | ans+=366;
| ^~~
| abs
foo.cc:34:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
34 | ans+=365;
| ^~~
| abs
foo.cc:36:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
36 | cout<<ans;
| ^~~
| abs
foo.cc: In function 'int myd(int)':
foo.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
17 | }
| ^
[Hydro](https://hydro.ac)提供评测服务