printf("编的些啥");
自己编的(“编的些啥&&累”)
#include<stdio.h>
int main()
{
int year,month,day,num;
year = 2008;
month = 8;
day = 8;
num = 0;
if(((year%4==0)&&((year%100)!=0))||(year%400==0))
{
switch(month)
{
case 12: day;
num += 31;
case 11: day;
num += 30;
case 10: day;
num += 31;
case 9: day;
num += 30;
case 8: day;
num += day;
case 7:
num += 31;
case 6:
num += 30;
case 5:
num += 31;
case 4:
num += 30;
case 3:
num += 31;
case 2:
num += 29;
case 1:
num += 31;
break;
}
printf("%d年%d月%d日是该年的第%d天",year,month,day,num);
}
else
{
switch(month)
{
case 12: day;
num += 31;
case 11: day;
num += 30;
case 10: day;
num += 31;
case 9: day;
num += 30;
case 8: day;
num += day;
case 7:
num += 31;
case 6:
num += 30;
case 5:
num += 31;
case 4:
num += 30;
case 3:
num += 31;
case 2:
num += 28;
case 1:
num += 31;
break;
}
printf("%d年%d月%d日是该年的第%d天",year,month,day,num);
}
}