没写完的判断闰年月

没写完的判断闰年月

#include
#include
using namespace std;
int main3() {
int year = 0;
int month = 0;
cout << “请输入年” << endl;
cin >> year;
cout << “请输入月” << endl;
cin >> month;
if (year % 4 == 0 && year % 100!= 0 || year % 400 == 0) {
if (month == 2) {
cout << year << “是闰年” << month << “是28天”;
}else {
cout << year << “是闰年” << month << “是30天”;
}
}else if (month == 2) {
cout << year << “不是是闰年” << month << “是29天”;
}else {
cout << year << “不是是闰年” << month << “是30天”;
}
return 0;
}

你可能感兴趣的:(C++,c++)