求高手不吝赐教 感谢!
#include<stdio.h>int main (void)
{
int year, month, day, sum,leap;
scanf("%d %d %d\n",&year,&month,&day);
switch(month)
{
case1:
sum=0;
break;
case2:
sum=31;
break;
case3:
sum=59;
break;
case4:
sum=90;
break;
case5:
sum=120;
break;
case6:
sum=151;
break;
case7:
sum=181;
break;
case8:
sum=212;
break;
case9:
sum=243;
break;
case10:
sum=273;
break;
case11:
sum=304;
break;
case12:
sum=334;
break;
}
sum=sum+day;
if(year%4==0)
leap=1;
else
leap=0;
if(leap==1&&month>2)
sum=sum++;
printf("%d\n",sum);
return 0;
}
为何运行结果是一串很长的数字?