int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};//各月的天数 int month,year; ... //计算出指定月份的天数 int monthDay = 0; if (1