为什么错啊,大神请指教
int sum;
swtich(month)
{
case 1:sum=0;break;
case 2:sum=28;break;
case 3:sum=(28+31);break;
case 4:sum=(28+31+30);break;
case 5:sum=(28+31+30+31);break;
case 6:sum=(28+31+30+31+30);break;
case 7:sum=(28+31+30+31+30+31);break;
case 8:sum=(28+31+30+31+30+31+31);break;
case 9:sum=(28+31+30+31+30+31+31+30);break;
case 10:sum=(28+31+30+31+30+31+31+30+31);break;
case 11:sum=(28+31+30+31+30+31+31+30+31+30);break;
case 12:sum=(28+31+30+31+30+31+31+30+31+30+31);break;
default: ;
}
if(year%400==0||(year%400!=0&&year%4==0))
{
sum=sum+day+1;
printf("%d年%d月%d日是该年的第%d天",year,month,day,sum);
}
else
{
sum=sum+day;
printf("%d年%d月%d日是该年的第%d天",year,month,day,sum);
}
return 0;
}