There are n individual performance score stored in the array, the test write functions, the function of which is lower than the corresponding average person as a function of the array index value is returned.
int avg(int score[],int n,int below[])
{
int n,sum,k,avg=0;
printf("开始处理函数avg()\n");
for(int i=1;i<=n;i++)
{
sum=sum+score[i];
}
avg=sum/n;
for(int m=1;m<=n;m++)
{
if(score[m]<avg)
{
below[k]=score[m];
k++;
}
cout<<k<<endl;
}
}