记录详情

Compile Error

foo.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
foo.c: In function 'main':
foo.c:18:7: error: stray '\357' in program
   18 | case 9:
      |       ^
foo.c:18:8: error: stray '\274' in program
   18 | case 9:
      |        ^
foo.c:18:9: error: stray '\232' in program
   18 | case 9:
      |         ^
foo.c:19:1: error: expected ':' or '...' before 'case'
   19 | case 11:len=30;break;
      | ^~~~
foo.c:20:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   20 | case 2:if(yy%4==0&&yy%100!=0||yy%400==0)len=29;
      |           ~~~~~~~^~~~~~~~~~~
foo.c:24:1: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   24 | if(mm<1||mm>12)
      | ^~
foo.c:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   25 | printf("input error!");
      | 
foo.c:25:1: error: expected declaration or statement at end of input
   25 | printf("input error!");
      | ^~~~~~
foo.c:4:11: warning: variable 'len' set but not used [-Wunused-but-set-variable]
    4 | int yy,mm,len;
      |           ^~~
foo.c:6:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 | scanf("%d%d",&yy,&mm);
      | ^~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
C语言课程设计考试
语言
C
递交时间
2022-05-31 12:04:48
评测时间
2022-05-31 12:04:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes