摘要:
structtagTime{intyear;intmonth;intday;};voidSet(inty,intm,intd,structtagTime*t)/*设置日期*/{t->year=y;t->month=m;t->day=d;}intIsLeapYear(intyear)/*是否闰年*/{return((year%4==0)&&(year%100!=0)||year%400==0);}intGetLastDay(structtagTimedate)/*得到date.month的最大天数*/{intnum;switch(date.month){case 阅读全文