#include <stdio.h>
struct stu
{
int number;
struct stu *course;
double score;
};
int main()
{
int i;
struct stu student[4];
struct stu sco[5];
student->course=sco;
printf("请输入各学生学号及成绩:\n");
for(i=0;i<2;i++)
scanf("%d%lf%lf%lf",&student[i].number,&student[i].course[0].score,&student[i].course[1].score,&student[i].course[2].score);
for(i=0;i<2;i++)
printf("%d:%f,%f,%f\n",student[i].number,student[i].course[0].score,student[i].course[1].score,student[i].course[2].score);
return 0;
}
不能输出出来,没反应