#include <array> #include <iostream> using namespace std; // 获取当月的天数 int GetMonthDay(int year,int month) { std::array<int, 13>monthday = {0,31,28,31,30,31,30,31,31,30,31,30,31}; if(month == 2 && ((year %4 == 0 && year % 100 !=0) || year % 400 ==0)) { ...