foo.c: In function 'main':
foo.c:5:15: warning: multi-character character constant [-Wmultichar]
5 | scanf('&d&d',&nian,&yue)
| ^~~~~~
foo.c:5:23: error: 'nian' undeclared (first use in this function)
5 | scanf('&d&d',&nian,&yue)
| ^~~~
foo.c:5:23: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:29: error: 'yue' undeclared (first use in this function)
5 | scanf('&d&d',&nian,&yue)
| ^~~
foo.c:5:15: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
5 | scanf('&d&d',&nian,&yue)
| ^~~~~~
| |
| int
In file included from foo.c:1:
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:421:42: note: expected 'const char * restrict' but argument is of type 'int'
421 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:5:33: error: expected ';' before 'if'
5 | scanf('&d&d',&nian,&yue)
| ^
| ;
6 | if(nian%4==0)
| ~~
[Hydro](https://hydro.ac)提供评测服务