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:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
39 | if (year1 % 4 == 0 && year1 % 100 != 0 || year1 % 400 == 0) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
foo.c:40:20: warning: implicit declaration of function 'z' [-Wimplicit-function-declaration]
40 | sum += z(year2, month2, day2) + 365 - z(year2, month2, day2);
| ^
foo.c: In function 'z':
foo.c:53:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
53 | if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务