#编程序#输入某班级 20 个学生某课程的考试成绩,要求统计并输出班级总分及大于等于 60 分的人数。
#include<stdio.h>
int main()
{
float a[20],s=0;
int i,j;
for(i=0,j=0;i<20;i++)
{
printf("The mark is:");
scanf("%f",&a[i]);
s+=a[i];
if(a[i]>=60)
{
j++;
}
}
printf("\nThe class grade sum = %f\n",s);
printf("The number of the students whose mark is more than 60 is %d\n",j);
return 0;
}