帮忙看看哪里错了
#include <stdio.h>
int main()
{
int year = 2008;
int month = 8;
int day = 8;
int i,sum;
for(i=1,sum=0;i<month;i++)
{
switch(i)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
sum+=31;
break;
case 4:
case 6:
case 9:
case 11:
sum+=30;
break;
default:
if(year%400==0||(year%4==0&&year%100!=0))
{
sum+=29;
}
else
{
sum+=28;
}
break;
}
}
sum+=day;
printf("%d年%d月%d日是该年的第%d天",year,month,day,sum);
return 0;
}