#include <stdio.h>#include<math.h>#define N 3struct student{ int num; char name; float chinese; float english; float math; float total;}st[N];float sum_out(struct student *p, int i){ st[i].total = p->chinese + p->english + p->math; return st[i].total}int main(){ int i; printf("输入学号 姓名 语文 英语 数学\n"); for (i = 0; i <= N; i++) { scanf("%d %s %f %f %f",&st[i].num,& st[i].name, &st[i].chinese, &st[i].english, &st[i].math); } printf("输出数据:学号 姓名 总分\n "); for (i = 0; i < =N; i++) { //st[i].total = st[i].chinese + st[i].english + st[i].math; stotal = sum_out(&st[i], i); printf("%d %s %5.1f ", st[i].num, st[i].name,stotal); }}可正常编译,在填写第一行学生的数据后,回车会弹出如下