Compile Error

foo.cc: In function 'int main()':
foo.cc:7:12: error: expected primary-expression before '||' token
    7 |  if(y%400==||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)提供评测服务

信息

递交者
类型
递交
语言
C++
递交时间
2022-07-10 14:32:21
评测时间
2022-07-10 14:32:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes