已知日期转天数;已知天数转日期
核心是判断闰年,可见:C语言判断闰年
//编译环境vs 2019
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
using namespace std;
#include <string>
int year = 0, sum = 0, month = 0, day = 0;
bool leapYear(int year);
int leapMonth[12] = {
31,29,31,30,31,30,31,31,30,31,30,31 };
int noleapMonth[12] = {
31,28,31,30,31,30