Compile Error

foo.cc:6:2: error: expected initializer before 'int'
  int year;
  ^~~
foo.cc:7:2: error: 'cin' does not name a type
  cin>>year;
  ^~~
foo.cc:8:2: error: expected unqualified-id before 'if'
  if(year%400==0||(year%4==0&&year%100!=0)) 
  ^~
foo.cc:12:6: error: expected unqualified-id before 'else'
      else  
      ^~~~
foo.cc:16:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
foo.cc:17:5: error: expected declaration before '}' token
     }
     ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1014 闰年
语言
C++
递交时间
2021-11-20 09:20:56
评测时间
2021-11-20 09:20:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes