Compile Error

foo.cc: In function 'int main()':
foo.cc:6:21: warning: variable 'days' set but not used [-Wunused-but-set-variable]
  int year,month,day,days;
                     ^~~~
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:5: error: expected unqualified-id before 'else'
     else if(month==11)
     ^~~~
foo.cc:52:5: error: expected unqualified-id before 'else'
     else if(month==12)
     ^~~~
foo.cc:56:2: error: expected unqualified-id before 'if'
  if(month>2)
  ^~
foo.cc:63:2: error: 'cout' does not name a type
  cout<<days;
  ^~~~
foo.cc:64:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
foo.cc:65:1: error: expected declaration before '}' token
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

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