哪位高手帮看上结构体一个小疑点,附代码、附图片 3Q
谁帮看下结构体一个小问题,附代码、附图片 3Q 在线等!

输出与输入的不一样,
而且每次执行都弹出 停止工作
怎么回事?
------解决方案--------------------
结构体中score数组下标是从0开始的,而你写成了从1开始
输出与输入的不一样,
而且每次执行都弹出 停止工作
怎么回事?
#include <stdio.h>
struct Student
{ int num;
char name[10];
float score[3];
};
int main()
{ void print(struct Student student[]);
void input(struct Student student[]);
struct Student stu[5];
input(stu);
print(stu);
return 0;
}
void input(struct Student student[])
{ int i;
printf("请输入学生数据:\n");
for(i=0;i<5;i++)
scanf("%d%s%f%f%f",&student[i].num,student[i].name,
&student[i].score[1],&student[i].score[2],&student[i].score[3]);
}
void print(struct Student student[])
{ int i;
printf("各位学生的信息:\n\n");
printf(" 学号 姓名 成绩\n");
for(i=0;i<5;i++)
printf("%6d%8s%8.2f%8.2f%8.2f\n",student[i].num,student[i].name,
student[i].score[1],student[i].score[2],student[i].score[3]);
}
------解决方案--------------------
结构体中score数组下标是从0开始的,而你写成了从1开始