3 #7

Merged
pn8rjlxip merged 1 commits from p2pwza8cv/System:z3 into master 2 years ago

//3 函数功能:计算每门课程的总分和平均分
void AverSumofEveryCourse(STU stu[], int n, int m){
int i, j;
float sum[COURSE NUM], aver[COURSE_NUM];/* ---------- begain ------__ */ for (j=0; j<m; j++){
sum[j] = 0;
for (i=0; i<n; i++){
sum[j] += stu[i].score[j];}
aver[j]=sum[j]/i;
printf("student %d: sum = %.0f, aver = %.0f\n",
j+1, sum[j],aver[j]);
}

  • end --________ */
//3 函数功能:计算每门课程的总分和平均分 void AverSumofEveryCourse(STU stu[], int n, int m){ int i, j; float sum[COURSE NUM], aver[COURSE_NUM];/* ---------- begain -----_-___ */ for (j=0; j&lt;m; j++){ sum[j] = 0; for (i=0; i&lt;n; i++){ sum[j] += stu[i].score[j];} aver[j]=sum[j]/i; printf("student %d: sum = %.0f, aver = %.0f\n", j+1, sum[j],aver[j]); } * end --________ */
p2pwza8cv added 1 commit 2 years ago
pn8rjlxip merged commit 6b654089b8 into master 2 years ago
The pull request has been merged as 6b654089b8.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: pn8rjlxip/System#7
Loading…
There is no content yet.