请学帝看看哪里不对? 为什么不能累加
#include <stdio.h>
int main()
{
int year = 2008;
int month = 8;
int day = 8;
int sum = 0;
int i = 1;
switch(month)
{
case 1 :sum==31;
case 2 :sum+=29;
case 3 :sum+=31;
case 4 :sum+=30;
case 5 :sum+=31;
case 6 :sum+=30;
case 7 :sum+=31;
case 8 :sum+=31;break;
case 9 :sum+=30;break;
case 10 :sum+=31;break;
case 11 :sum+=30;break;
case 12 :sum+=31;break;
default :;break;
}
if(year%4==0&&year%100!=0)
sum=sum+day;
else
sum=sum+day+i;
printf("%d年%d月%d日是该年中的第%d天",year,month,day,sum);
return 0;
}