菜鸟问话: 数据始终输不进去(Turbo C),?????
main(){
struct student
{
char name[10];
float score[3];
};
int i,j;
struct student stud[5];
for(j=0;j<5;j++)
{
printf("\nname:");
gets(stud[j].name);
for(i=0;i<3;i++)
{
printf("\nscore%d:",i);
scanf("%f",&stud[j].score[i]);
}
}
for(j=0;j<5;j++)
printf("\n%s,%f,%f,%f",stud[i].name,stud[j].score[0],stud[j].score[1],stud[j].score[2]);
getch();
}