excel中肿么求数组平均值

excel

1个回答

写回答

AI
AI

#define N 5struct stu{ long id; char name[20]; float score; }stu[N];void mAIn(){ int i=0;float aver=0,sum=0; printf(input the id ,name,score\n); while (iN) { scanf(%ld %s %f, &stu[i].id,stu[i].name,&stu[i].score); sum += stu[i].score; i++; } aver=sum/N; i=0; while (i N) { if (stu[i].scoreaver) printf(%ld %s %f\n, stu[i].id, stu[i].name, stu[i].score); i++; } }

举报有用(0分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号