#include <cmath> #include <iostream> using namespace std; bool isleap(int year) { return (year%4==0&&year%100!=0)||year%400==0; } //根据年与月返回当月的天数 int GetDaysByYM(int year,int month) { int days[13]={29,31,28,31,30,31,30,31,31,30,31,30,31}; if(month==2&&isleap(year)) { ...