Loading…
Reference in new issue
There is no content yet.
Delete Branch 'p2pwza8cv/System:z3'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Deleting a branch is permanent. It CANNOT be undone. Continue?
//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]);
}
6b654089b8
into master 2 years ago6b654089b8
.