XZG_伪代码 #34

Merged
pvfj5ugro merged 1 commits from XZG_伪代码 into master 2 years ago

@ -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
```
//函数功能:计算每个学生各门课程的总分和平均分

Loading…
Cancel
Save