呵呵,知道啊
#include"stdio.h"
main()
{
int day,month,year,sum;
printf("input year,month,day\n");
scanf("%d,%d,%d",&year,&month,&day);
sum=0;
switch(month)
{
case 12:sum+=30;
case 11:sum+=31;
case 10:sum+=30;
case 9:sum+=31;
case 8:sum+=31;
case 7:sum+=30;
case 6:sum+=31;
case 5:sum+=30;
case 4:sum+=31;
case 3:sum+=28;
case 2:sum+=31;
case 1:break;
default:printf("data error");
}
if(year%400==0||(year%4==0&&year%100!=0)&&month>2)sum++;
sum+=day;
printf("It is the %dth day.",sum);
scanf("\n");
}