大学平时成绩作业和出勤具体怎么算
发布时间:2024-10-30 14:23:47来源:未知
-#include int main(){ float chengji; int count_90=0; int sum=0; int count_stu=0; while(true) { scanf("%g",&chengji); if(chengji>=0) { sum+=chengji; count_stu++; if(chengji>=90) { count_90++; } } if(chengji<0) { float pingjun=sum*1./count_stu; printf("平均分是:%g\n90分以上的人有%d人",pingjun,count_90); return 0; } } return 0;}