Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5607 | 邱一涵 | 08判断是否为闰年 | C++ | Compile Error | 0 MS | 0 KB | 498 | 2024-11-30 20:28:34 |
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ int year; cin>>year; if (year%400==0){ cout<<year<<" Yes"<<endl; } else { if(year%4==0){ if(year%100!=0){ cout<<year<<" Yes"; } else { cout<<year<<" No"; } else { cout<<year<<"No"; } } return 0; }
Main.cc: In function 'int main()': Main.cc:23:9: error: expected '}' before 'else' else ^