#include<stdio.h>
int main(){
int stuCnt,i = 0,pass = 0,fail = 0;
float score;
printf("请输入学生人数:");
scanf("%d",&stuCnt);
printf("请输入所有学生成绩:");
while(i < stuCnt){
scanf("%f",&score);
if(score >= 60)
pass++;
else fail++;
i++;
}
printf("及格人数:%d\n不及格人数:%d\n",pass,fail);
return 0;
}
![](https://iknow-pic.cdn.bcebos.com/503d269759ee3d6dcc59221e48166d224e4ade4c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)