Run ID:63051
提交时间:2024-01-03 21:30:07
#include<iostream> using namespace std; int main() { int n; cout << "请输入一个年份,以判断是不是闰年:"; cin >> n; if (n % 4 == 0 && n % 100 != 0 || n % 400 == 0) cout << "今年是闰年" << endl; else cout << "今年是平年" << endl; return 0; }