#include
main()
{
double grade[200];
double sum,avg,temp;
int count,i,n;
i=0;
count=0;
sum=0;
printf("请依次输入每个同学的成绩,输入-1结束\n");
scanf("%lf",&temp);
while(temp!=-1)
{
grade[i++]=temp;
count++;
sum=sum+temp;
scanf("%lf",&temp);
}
avg=sum/count;
n=0;
for(i=0;i { if(grade[i]>=avg) n++; } printf("全班平均分%.2lf,成绩大于等于平均分的人有%d人\n",avg,n); }