在这里插入代码片
#include<stdio.h>
main()
{
int year,mouth,day,days=0;
int w,m,d,y;
printf("请输入年,月,日\n");
scanf("%d%d%d",&y,&m,&d);
mouth=m;
year=y;
day=d;
switch(mouth)
{
case 1:days=0;break;
case 2:days=31;break;
case 3:days=59;break;
case 4:days=90;break;
case 5:days=120;break;
case 6:days=151;break;
case 7:days=181;break;
case 8:days=212;break;
case 9:days=243;break;
case 10:days=273;break;
case 11:days=304;break;
case 12:days=334;break;
}
days+=day;
if(mouth>2&&year%4==0&&year%100!=0||year%400==0)
days++;
printf("%d年%d月%d日第%d天",year,mouth,day,days);
}