foo.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
foo.c: In function 'main':
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)提供评测服务