一种比较优雅的解法(少了很多判断) #include <iostream> using namespace std; int MonthArray[] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; int GetMonth_day(int year,int month)//获取当年当月的天数 { int day = MonthArray[month]; if (month == 2 && ((year % 4 == 0) && (year % 100 != 0 || year % 400 =...