请教各位,我这样的代码有问题吗?答案是正确的
#include <stdio.h> int main() { /* 定义需要计算的日期 */ int year = 2008; int month = 8; int day = 8; int i,l; switch(month) { case 1:i=0;break; case 2:i=31;break; case 3:i=59;break; case 4:i=90;break; case 5:i=120;break; case 6:i=151;break; case 7:i=181;break; case 8:i=212;break; case 9:i=243;break; case 10:i=273;break; case 11:i=304;break; case 12:i=334;break; } i += day; if((year%4 ==0 && year%100 !=0) || year%400 ==0) i++; printf("%d年%d月%d日是该年的第%d天", year,month,day,i); return 0; }