Compile Error

foo.cc: In function 'int main()':
foo.cc:5:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    5 |     scanf_s("%d %d", &year, &month);
      |     ^~~~~~~
      |     scanf
foo.cc:8:24: error: expected primary-expression before '==' token
    8 |     case 2:if (year %  ==  || (year %  ==  && year %  != ))
      |                        ^~
foo.cc:8:28: error: expected primary-expression before '||' token
    8 |     case 2:if (year %  ==  || (year %  ==  && year %  != ))
      |                            ^~
foo.cc:8:40: error: expected primary-expression before '==' token
    8 |     case 2:if (year %  ==  || (year %  ==  && year %  != ))
      |                                        ^~
foo.cc:8:55: error: expected primary-expression before '!=' token
    8 |     case 2:if (year %  ==  || (year %  ==  && year %  != ))
      |                                                       ^~
foo.cc:8:58: error: expected primary-expression before ')' token
    8 |     case 2:if (year %  ==  || (year %  ==  && year %  != ))
      |                                                          ^
foo.cc:13:10: error: expected primary-expression before ':' token
   13 |     case :
      |          ^
foo.cc:14:10: error: expected primary-expression before ':' token
   14 |     case :
      |          ^
foo.cc:15:10: error: expected primary-expression before ':' token
   15 |     case :
      |          ^
foo.cc:16:10: error: expected primary-expression before ':' token
   16 |     case :printf("30\n"); break;
      |          ^
foo.cc:19:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   19 |     return ;
      |     ^~~~~~
foo.cc:8:47: error: label 'year' used but not defined
    8 |     case 2:if (year %  ==  || (year %  ==  && year %  != ))
      |                                               ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1024 某月的天数
语言
C++
递交时间
2022-07-08 20:38:11
评测时间
2022-07-08 20:38:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes