foo.c: In function 'main':
foo.c:16:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
16 | if (year1 % 4 == 0 && year1 % 100 != 0 || year1 % 400 == 0) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
foo.c:21:21: warning: unused variable 'x' [-Wunused-variable]
21 | int x;
| ^
foo.c:32:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
32 | if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) {
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
foo.c:39:13: error: conflicting types for 'day'; have 'int(int, int, int)'
39 | int day(int year1, int month1, int day1);
| ^~~
foo.c:2:5: note: previous declaration of 'day' with type 'int(int)'
2 | int day(int year);
| ^~~
foo.c:41:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | if (year1 % 4 == 0 && year1 % 100 != 0 || year1 % 400 == 0) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
foo.c: In function 'day':
foo.c:55:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
55 | if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务