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