int month_day(int year,int month) //判断这一个月有多少天{ int mon_day[]={31,28,31,30,31,30,31,31,30,31,30,31}; //初始化每个月的天数if(leap(year)&&month==2 ) return 29; else return(mon_day[month-1]);