foo.cc:2:1: error: '::main' must return 'int'
2 | void main()
| ^~~~
foo.cc: In function 'int date(int, int, int)':
foo.cc:16:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
16 | if(r=1)
| ~^~
foo.cc:20:1: error: 'else' without a previous 'if'
20 | else if(month<3)
| ^~~~
foo.cc:25:1: error: 'else' without a previous 'if'
25 | else
| ^~~~
foo.cc: In function 'int run(int)':
foo.cc:34:10: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
34 | if(a%4==0&&a%100!=0||a%400==0) r=1;
| ~~~~~~^~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:6:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d,%d,%d",&year,&month,&day);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务