You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
System/z3

12 lines
389 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// 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 --________ */