foo.cc: In function 'int Daybefore(date*)':
foo.cc:24:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
24 | case 2:if(q->year%4==0&&q->year%100!=0||q->year%400==0)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
foo.cc:11:11: warning: unused variable 'answer' [-Wunused-variable]
11 | int l,answer=0;
| ^~~~~~
foo.cc: In function 'int Dayafter(date*)':
foo.cc:49:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
49 | case 2:if(p->year%4==0&&p->year%100!=0||p->year%400==0)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
foo.cc: In function 'int Midday(int)':
foo.cc:61:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
61 | if(d%4==0&&d%100!=0||d%400==0)
| ~~~~~~^~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:73:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
73 | scanf("%d%d%d",&p2.year,&p2.month,&p2.day);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务