显示最高分和最低分问题。
void fnDataIn(struct person data[],int n){
printf("Pls input students:number,name,sex,course(Chinese,Math,English,Java,C)\n");
for(i=0;i<n;i++)
scanf("%s%s%s%d%d%d%d%d",data[i].number,data[i].name,data[i].sex,&data[i].score.Chinese,&data[i].score.Math,&data[i].score.English,&data[i].score.Java,&data[i].score.C);
}
void fnPlan_A(struct person data[],int n)
{
for(k=1;k<=N-1;k++)
{
for(i=N-1;i>=k;i--)
{
if(data.score[i]<data.score[i-1])
{
t=data.score[i];
data.score[i]=data.score[i-1];
data.score[i-1]=t;
}
}
}
printf("%d%d",score[0],score[N-1]);
}
想显示最高分和最低分,data.score[i]应该写成什么?好像不是data.score