不知道哪里出错了,求解
#include <stdio.h>
int main()
{
/* 定义需要计算的日期 */
int year = 2008;
int month = 7;
int day = 8;
int total=0;
switch(month)
{
case 1:total+=31;
case 2:
if(year%4==0&&year%100==0&&year%400!=0)
{total+=29;}
else{
total+=28;
}
case 3:total+=31;
case 4:total+=30;
case 5:total+=31;
case 6:total+=30;
case 7:total+=31;
case 8:total+=31;
case 9:total+=30;
case 10:total+=31;
case 11:total+=30;
case 12:total+=31;
}
total=total+day+1;
printf("%d年%d月%d日是该年的%d天",year,month,day,total);
return 0;
}
请问哪里出了问题