哪位大哥帮我看看错了吗,多谢
#include <stdio.h>
int main()
{
/* 定义需要计算的日期 */
int year = 2008;
int month = 8;
int day = 8;
int i=0;
switch(month)
{
case 1:i+=31;break;
case 2:i+=28;break;
case 3:i+=31;break;
case 4:i+=30;break;
case 5:i+=31;break;
case 6:i+=30;break;
case 7:i+=31;break;
case 8:i+=31;break;
case 9:i+=30;break;
case 10:i+=31;break;
case 11:i+=30;break;
case 12:i+=31;break;
}
if(year%4==0&&year%100!==0||year%100==0&&year%400==0)
i+=1;
printf("%d年%d月%d日是第%d天",year,month,day,i);
return 0;
}