为什么输出了32985?求解释
#include <stdio.h>
int main()
{
int year = 2008;
int month = 8;
int day = 8;
int sum,flag;
switch(month)
{
case 1:sum+=day;break;
case 2:sum+=31+day;break;
case 3:sum+=59+day;break;
case 4:sum+=90+day;break;
case 5:sum+=120+day;break;
case 6:sum+=151+day;break;
case 7:sum+=181+day;break;
case 8:sum+=212+day;break;
case 9:sum+=243+day;break;
case 10:sum+=273+day;break;
case 11:sum+=304+day;break;
case 12:sum+=334+day;break;
default:printf("Get away,bitch!");break;
}
if((year%4==0&&year%100!=0)||year%400==0)
flag=1;
else
flag=0;
if(flag==1&&month>2)
printf("%d年%d月%d日是本年的第%d天。",year ,month,day,sum++);
else
printf("%d年%d月%d日是本年的第%d天。",year ,month,day,sum);
return 0;
}