文章
1
粉丝
53
获赞
1
访问
617
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <algorithm>
#include<map>
using namespace std;
struct node {
int year;
int month;
int day;
}n;
int main() {
char x[1000];
while (cin >> n.year >> n.month >> n.day) {
int f[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
if ((n.year % 400 == 0) || (n.year % 4 == 0) && (n.year % 100 != 0)) {
f[2] = 29;
}
else {
f[2] = 28;
}
int flag = 0;
if (n.year < 0 || n.year>9999) {
flag = 1...
登录后发布评论
别的不说,你头文件只要iostream就行,写那么多干嘛
输出要换行