foo.c: In function 'main':
foo.c:7:15: warning: missing terminating " character
7 | scanf("%d%d,&year,&month);
| ^
foo.c:7:15: error: missing terminating " character
7 | scanf("%d%d,&year,&month);
| ^~~~~~~~~~~~~~~~~~~~
foo.c:9:62: error: expected ')' before ';' token
9 | printf("year = %d,month = %d\n",year,month);
| ^
| )
foo.c:7:14: note: to match this '('
7 | scanf("%d%d,&year,&month);
| ^
foo.c:9:19: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
9 | printf("year = %d,month = %d\n",year,month);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| 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:30:19: error: expected declaration or statement at end of input
30 | }
| ^
foo.c:4:24: warning: unused variable 'day' [-Wunused-variable]
4 | int year,month,day;
| ^~~
[Hydro](https://hydro.ac)提供评测服务