foo.cc: In function 'int main()':
foo.cc:7:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
7 | if(y%400==0||y%4==0&&y%100!=0)
| ~~~~~~^~~~~~~~~~
foo.cc:11:3: error: case label '2' not within a switch statement
11 | case 2:cout<<28+leap<<endl;break;
| ^~~~
foo.cc:12:3: error: case label '4' not within a switch statement
12 | case 4:case 6:case 11:cout<<30<<endl;break;
| ^~~~
foo.cc:12:10: error: case label '6' not within a switch statement
12 | case 4:case 6:case 11:cout<<30<<endl;break;
| ^~~~
foo.cc:12:17: error: case label '11' not within a switch statement
12 | case 4:case 6:case 11:cout<<30<<endl;break;
| ^~~~
foo.cc:13:3: error: case label not within a switch statement
13 | default:cout<<31<<endl;
| ^~~~~~~
foo.cc:5:8: warning: unused variable 'm' [-Wunused-variable]
5 | int y,m,leap=0;
| ^
[Hydro](https://hydro.ac)提供评测服务