Compile Error

foo.cc: In function 'int main()':
foo.cc:7:20: error: 'day' was not declared in this scope
  cin>>year>>month>>day;
                    ^~~
foo.cc:7:20: note: suggested alternative: 'days'
  cin>>year>>month>>day;
                    ^~~
                    days
foo.cc:16:10: error: 'month3' was not declared in this scope
  else if(month3)
          ^~~~~~
foo.cc:16:10: note: suggested alternative: 'month'
  else if(month3)
          ^~~~~~
          month
foo.cc: At global scope:
foo.cc:20:2: error: expected unqualified-id before 'else'
  else if(month 4)
  ^~~~
foo.cc:24:5: error: expected unqualified-id before 'else'
     else if(month 5)
     ^~~~
foo.cc:28:5: error: expected unqualified-id before 'else'
     else if(month 6 )
     ^~~~
foo.cc:32:2: error: expected unqualified-id before 'else'
  else if(month 7)
  ^~~~
foo.cc:36:2: error: expected unqualified-id before 'else'
  else if(month 8)
  ^~~~
foo.cc:40:2: error: expected unqualified-id before 'else'
  else if(month 9)
  ^~~~
foo.cc:44:5: error: expected unqualified-id before 'else'
     else if(month 10)
     ^~~~
foo.cc:48:6: error: expected unqualified-id before 'else'
      else if(month 11)
      ^~~~
foo.cc:52:10: error: expected unqualified-id before 'else'
          else if(month 12)
          ^~~~
foo.cc:56:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
foo.cc:57:1: error: expected declaration before '}' token
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1025 计算某日期的天数***
语言
C++
递交时间
2021-11-27 09:20:20
评测时间
2021-11-27 09:20:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes