#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
int main(void) {
int year; //年
int month; //月
bool flag = false; //假
int days; //天
cout << "请输入年份:";
cin >> year;
cout << "请输入月分:";
cin >> month;
if ((year % 400) ==0) {
flag = true;
} else if ((year % 4) ==0
让用户输入年份和月份,然后输出这个月有多少天。
最新推荐文章于 2024-04-08 14:12:51 发布