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