数据结构问题
#include<stdio.h>#include<string.h>
#define N 5
struct scroe
{
float ma;
float fl;
float pe;
};//定义各科目分数结构
struct student
{
char num[3];
char name[10];
struct scoreeach;
};//结构中加分数结构
struct student stu[N]={{"1","Tom",{80,87,60}},{"2","Mike",{70,65,80}},
{"3","Angle",{85,80,70}},{"4","Bobo",{60,85,90}},{"5","Cook",{90,60,60}}};
printf("输出学生的信息\n");
printf("学号 姓名 高数 外语 体育");
for(int i=0;i<5;i++)
{
printf("%s%5s%5f%5f%5f",stu[i].num,stu[i].name,stu[i].score each.ma,stu[i].score each.fl,stu[i].score each.pe);
}
}
我想定义一个各科分数的结构然后在student结构中引用并输出,请问该怎么改?谢谢大神