# 计算该日在本年中是第几天

``2000 12 31``

``366``

``````
int N=100;
struct student
{char num[6];
char name[8];
int score[3];
}stu[100];
void print(struct student st)
{	 int i,j;
printf("%s,%s",st.num,st.name);
for(j=0;j<3;j++)
printf(",%d",st.score[j]);
printf("\n");
}
main()
{int i,j ;
scanf ("%d",&N);
for(i=0;i<N;i++)
{
//printf("Input score of student %d:\n",i+1);
//printf("no.:");
scanf("%s",stu[i].num);
///printf("name:");
scanf("%s",stu[i].name);
for(j=0;j<3;j++)
{//printf("score%d:",j+1);
scanf("%d",&stu[i].score[j]);
}

print(stu[i]);
}

}``````

``````
int N=100;
struct student
{char num[6];
char name[8];
int score[3];
}stu[100];
void print(struct student st)
{	 int i,j;
printf("%s,%s",st.num,st.name);
for(j=0;j<3;j++)
printf(",%d",st.score[j]);
printf("\n");
}
main()
{int i,j ;
scanf ("%d",&N);
for(i=0;i<N;i++)
{
//printf("Input score of student %d:\n",i+1);
//printf("no.:");
scanf("%s",stu[i].num);
///printf("name:");
scanf("%s",stu[i].name);
for(j=0;j<3;j++)
{//printf("score%d:",j+1);
scanf("%d",&stu[i].score[j]);
}

print(stu[i]);
}

}``````