#include<stdio.h>
int average_num(int a[],int n);
int main()
{int n,i,num;
int a[5];
printf("请输入要输入数组元素的个数:\n");
scanf("%d",&n);
printf("请输入要输入的数组:\n");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
num=average_num(a,n);
printf("the num is :%d\n",num);
return 0;
}
int average_num(int a[],int n)
{int i,sum=0,k=0;
float average;
for(i=0;i<n;i++)
sum=sum+a[i];
average=sum*1.0/n;
for(i=0;i<n;i++)
if(average>a[i]) k++;
return (k);
}