#include<iostream>
using namespace std;
int main()
{
    float a[10],average,zf=0;//zf不初始化就会出错
    int i,jis=0;
    for(i=0;i<10;i++)
        {
            cin>>a[i];
            zf=zf+ a[i];
        }
    average=zf/10;
    cout<<"平均分是:"<<average<<endl;
    for(i=0;i<10;i++)
        {
            if(a[i]>average)
                jis=jis+1;
        }
    cout<<"大于平均分的人数是:"<<jis<<endl;
    return 0 ;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: