这个行吗大神求教
#include <stdio.h>
int main()
{
/* 定义需要计算的日期 */
int year = 2008;
int month = 1;
int day = 8;
int sum=0;
for(month=1,sum=0;month<8;month++)
{
switch(month)
{
case 1
sum=sum+31;
break;
case 2
sum+=29;
break;
case 3
sum+=31;
break;
case 4
sum+=30;
break;
case
sum+=31;
break;
case 6
sum+=30;
break;
case 7
sum+=31;
break;
}
}
sum=sum+8;
printf("%d年%d月%d日是该年第%d天",year,month,day,sum);