那儿错啦?
#include<stdio.h>#include<string.h>
struct student
{int num;
char name[20];
float score[3];
};
void main()
{void print(struct student *s);
struct student stu[5];
int i,j;
for(i=0;i<5;i++)
{printf("\nInput score of stuent %d:\n",i+1);
printf("NO.");
scanf("%d",&stu[i].num);
printf("name:");
scanf("%s",stu[i].name);
for(j=0;j<3;j++)
{printf("score%d:",j+1);
scanf("%f",&stu[i].score[j]);
}
printf("\n");
}
print(stu);
}
void print(struct student *s)
{
int i;
for(i=0;i<5;i++,s++)
printf("%d\t%s\t%f\t%f\t%f\n",(*s).num,(*s).name,(*s).score[0],(*s).score[1],(*s).score[2]);
}