慕沐4449596
#include<stdio.h>#define N 30int main(){ int shuzu[N],i; int pass=0,defail=0,sum=0,ave; printf("请输入%d个人的成绩:\n",N); for(i=0;i<N;i++) { scanf("%d",&shuzu[i]); sum+=shuzu[i]; if(shuzu[i]>=60) pass++; else if(shuzu[i]<60) defail++; } ave=sum/N; printf("平均成绩为:%d\n",ave); printf("及格人数为:%d\n",pass); printf("不及格人数为:%d\n",defail); return 0;}