记录详情

Compile Error

foo.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
foo.c: In function 'main':
foo.c:8:5: error: 'yeaar' undeclared (first use in this function); did you mean 'year'?
    8 |  if(yeaar%100==0)
      |     ^~~~~
      |     year
foo.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:17:8: error: expected '(' before 'leap'
   17 | switch leap=0;
      |        ^~~~
      |        (
foo.c:30:19: error: expected ';' before ':' token
   30 | case 11:d=30;break:
      |                   ^
      |                   ;
foo.c:31:27: error: 'else' without a previous 'if'
   31 | case 12:if(leap==0) d=28; else d=29;break;
      |                           ^~~~
foo.c:3:23: warning: variable 'd' set but not used [-Wunused-but-set-variable]
    3 | { int year,month,leap,d;
      |                       ^
foo.c:3:18: warning: variable 'leap' set but not used [-Wunused-but-set-variable]
    3 | { int year,month,leap,d;
      |                  ^~~~
foo.c:5:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    5 | scanf("%d%d",&year,&month);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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