以下是某C程序段,其功能是计算出某一天是一年中的第几天,请仔细阅读程序并完成要求。 # include<stdio.h> struct days
int year; int month; int date; day; void main()
struct days *P; int nun=0,i; int met3]=0,31,28,31,30,31,30,31,31,30,31,30,31; P=&day; printf("please input the day:\n"); scanf("%d%d%d",&(P->year),&(P->month),&(P->date)); for(i=0;i<(p->month);i++) num+=m[i]; hum+=(p->date); if((p->year)%4==0&&(P->year)%i00 1=0||(p->year)%400==0) if((p->month)>2) num++: printf("This day is%d day in the year.\n",hum);