foo.cc: In function 'int main()':
foo.cc:18:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
18 | if(i&4==0&&i%100!=0||i%400==0){
| ~^~~
foo.cc:18:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
18 | if(i&4==0&&i%100!=0||i%400==0){
| ~~~~~~^~~~~~~~~~
foo.cc:27:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
27 | if(D1.year&4==0&&D1.year%100!=0||D1.year%400==0){
| ~^~~
foo.cc:27:24: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
27 | if(D1.year&4==0&&D1.year%100!=0||D1.year%400==0){
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
foo.cc:32:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
32 | if(i&4==0&&i%100!=0||i%400==0){
| ~^~~
foo.cc:32:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
32 | if(i&4==0&&i%100!=0||i%400==0){
| ~~~~~~^~~~~~~~~~
foo.cc:41:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
41 | if(D2.year&4==0&&D2.year%100!=0||D2.year%400==0){
| ~^~~
foo.cc:41:24: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | if(D2.year&4==0&&D2.year%100!=0||D2.year%400==0){
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
foo.cc:15:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
15 | scanf("%d %d %d",&D1.year,&D1.month,&D1.day);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:16:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf("%d %d %d",&D2.year,&D2.month,&D2.day);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务