我这段程序为什么不行啊,大神帮忙看下,跪谢
int sum;
switch(month) /*对月份进行情况讨论
{
case 1;sum = 0+day;break;
case 2;sum = 31+day;break;
case 3;sum = 31+28+day;break;
case 4;sum = 31+28+31+day;break;
case 5;sum = 31+28+31+30+day;break;
case 6;sum = 31+28+31+30+31+day;break;
case 7;sum = 31+28+31+30+31+30+day;break;
case 8;sum = 31+28+31+30+31+30+31+day;break;
case 9;sum = 31+28+31+30+31+30+31+31+day;break;
case 10;sum = 31+28+31+30+31+30+31+31+30+day;break;
case 11;sum = 31+28+31+30+31+30+31+31+30+31+day;break;
case 12;sum = 31+28+31+30+31+30+31+31+30+31+30+day;break;
default:printf("一年当中只有12个月哦");break;
}
sum = sum+day;
if(year%4 == 0)
{
if(month < 3)
{
printf("%d年%d月%d日是该年的第%d天",year,month,day,sum);
}
printf("%d年%d月%d日是该年的第%d天",year,month,day,sum+1);
}
else
{
printf(%d年%d月%d日是该年的第%d天",year,month,day,sum);
}