|
|
|
@ -652,17 +652,19 @@ int Menu(void)
|
|
|
|
|
|
|
|
|
|
// 函数功能:输入 n 个学生的 m 门课成绩
|
|
|
|
|
```
|
|
|
|
|
void ReadScore(STU stu[],int n,int m)
|
|
|
|
|
{
|
|
|
|
|
function ReadScore(STU stu[],int n,int m) do
|
|
|
|
|
|
|
|
|
|
int i,j;
|
|
|
|
|
printf("Input student's ID ,name and score:\n");
|
|
|
|
|
for(i=0;i<n;i++) //输入n个同学
|
|
|
|
|
{
|
|
|
|
|
scanf("%ld%s",&stu[i].num,stu[i].name);
|
|
|
|
|
for(j=0;j<m;j++) //输入m门成绩
|
|
|
|
|
scanf("%f",&stu[i].score[j]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printf "Input student's ID ,name and score:\n"
|
|
|
|
|
for from i=0 to n-1 do //输入n个同学
|
|
|
|
|
|
|
|
|
|
input stu[i].num,stu[i].name
|
|
|
|
|
for form j=0 to m-1 do //输入m门成绩
|
|
|
|
|
input stu[i].score[j]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
//函数功能:计算每个学生各门课程的总分和平均分
|
|
|
|
|