记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:9: warning: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d%d",year,month);
      |         ^~~~~~~
      |         scanf
foo.c:12:12: error: 'month1' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |            ^~~~~~
      |            month
foo.c:12:12: note: each undeclared identifier is reported only once for each function it appears in
foo.c:12:20: error: 'month3' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |                    ^~~~~~
      |                    month
foo.c:12:28: error: 'month5' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |                            ^~~~~~
      |                            month
foo.c:12:36: error: 'month7' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |                                    ^~~~~~
      |                                    month
foo.c:12:44: error: 'month8' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |                                            ^~~~~~
      |                                            month
foo.c:12:52: error: 'month10' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |                                                    ^~~~~~~
      |                                                    month
foo.c:12:61: error: 'month12' undeclared (first use in this function); did you mean 'month'?
   12 |         if(month1||month3||month5||month7||month8||month10||month12)
      |                                                             ^~~~~~~
      |                                                             month
foo.c:14:12: error: 'month4' undeclared (first use in this function); did you mean 'month'?
   14 |         if(month4||month6||month9||month11)
      |            ^~~~~~
      |            month
foo.c:14:20: error: 'month6' undeclared (first use in this function); did you mean 'month'?
   14 |         if(month4||month6||month9||month11)
      |                    ^~~~~~
      |                    month
foo.c:14:28: error: 'month9' undeclared (first use in this function); did you mean 'month'?
   14 |         if(month4||month6||month9||month11)
      |                            ^~~~~~
      |                            month
foo.c:14:36: error: 'month11' undeclared (first use in this function); did you mean 'month'?
   14 |         if(month4||month6||month9||month11)
      |                                    ^~~~~~~
      |                                    month
foo.c:16:12: error: 'month2' undeclared (first use in this function); did you mean 'month'?
   16 |         if(month2)
      |            ^~~~~~
      |            month
foo.c:5:20: warning: variable 'day' set but not used [-Wunused-but-set-variable]
    5 |     int year,month,day;
      |                    ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
2022年迎新赛(第一场)
语言
C
递交时间
2022-08-15 08:56:32
评测时间
2022-08-15 08:56:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes