记录详情

Compile Error

foo.c: In function 'to_day':
foo.c:12:1: error: expected ';' before 'day'
 day += (i%4==0 && i%100!=0 || i%400==0)? 366 : 365;
 ^~~
foo.c:14:1: error: expected expression before '}' token
 }
 ^
foo.c:14:1: error: expected expression before '}' token
foo.c:6:5: warning: unused variable 'day' [-Wunused-variable]
 int day = 0;
     ^~~
foo.c:4:5: warning: unused variable 'mon' [-Wunused-variable]
 int mon[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
     ^~~
foo.c: At top level:
foo.c:16:1: error: expected identifier or '(' before 'if'
 if(y%4==0 && y%100!=0 || y%400==0) mon[2]++;
 ^~
foo.c:18:1: error: expected identifier or '(' before 'for'
 for(i=1; i
 ^~~
foo.c:18:10: error: unknown type name 'i'
 for(i=1; i
          ^
foo.c:20:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token
 day += mon[i];
     ^~
foo.c:22:1: error: expected identifier or '(' before '}' token
 }
 ^
foo.c:24:1: error: expected identifier or '(' before 'return'
 return day + d;
 ^~~~~~
foo.c:26:1: error: expected identifier or '(' before '}' token
 }
 ^
foo.c:41:1: error: expected declaration specifiers or '...' before '{' token
 {
 ^
foo.c: In function 'to_day':
foo.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2021年中北算法竞赛队招新测试
语言
C
递交时间
2021-10-24 17:15:25
评测时间
2021-10-24 17:15:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes