#include <stdio.h>
int main()
{
int year = 2008;
int month = 8;
int day = 8;
int out,flag;
switch(month)
{
case1:out=0;break;
case2:out=31;break;
case3:out=59;break;
case4:out=90;break;
case5:out=120;break;
case6:out=151;break;
case7:out=181;break;
case8:out=212;break;
case9:out=243;break;
case10:out=273;break;
case11:out=304;break;
case12:out=334;break;
default: printf("一年中只有12个月");break;
}
out=out+day;
if ((year%4==0 && year%100>0) || year%400==0)
flag=1;
else
flag=0;
if (flag==1&&month>2)
out++;
printf("%d年%d月%d日是该年的第%d天",year,month,day,out);
return 0;
}