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)提供评测服务