foo.c: In function 'main':
foo.c:10:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
10 | leap1=(year1%400==0||year1%4==0&&year1%100!=0);//2020年不是闰年
| ~~~~~~~~~~^~~~~~~~~~~~~~
foo.c:11:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
11 | leap2=(year2%400==0||year2%4==0&&year2%100!=0);
| ~~~~~~~~~~^~~~~~~~~~~~~~
foo.c:39:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
39 | if(year1%400==0||year1%4==0&&year1%100!=0)//假设我不知道的情况下
| ~~~~~~~~~~^~~~~~~~~~~~~~
foo.c:54:25: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
54 | if(i%400==0||i%4==0&&i%100!=0)
| ~~~~~~^~~~~~~~~~
foo.c:6:38: warning: unused variable 'sum' [-Wunused-variable]
6 | int year1,month1,day1,i,leap1,leap2,sum=0;
| ^~~
foo.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%d%d%d",&year1,&month1,&day1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d%d",&year2,&month2,&day2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务