记录详情

Compile Error

foo.c: In function 'main':
foo.c:19:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   19 |   case 2: if(y%4==0&&y%100!=0||y%400==0)len=29;
      |              ~~~~~~^~~~~~~~~~
foo.c:26:31: error: expected ';' at end of input
   26 |   printf("%d,%d,%d\n",y,m,len)
      |                               ^
      |                               ;
foo.c:25:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   25 |  else
      |  ^~~~
foo.c:26: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   26 |   printf("%d,%d,%d\n",y,m,len)
      | 
foo.c:26:3: error: expected declaration or statement at end of input
   26 |   printf("%d,%d,%d\n",y,m,len)
      |   ^~~~~~
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    5 |  scanf("%d%d",&y,&m);
      |  ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A1-3 分支结构练习:月份天数
语言
C
递交时间
2022-05-31 11:33:51
评测时间
2022-05-31 11:33:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes