<pre class="csharp" name="code"><span style="font-size:18px;">#include<stdio.h>
#include<stdlib.h>
int Count(double a[],int n)
{
int i,j=0;
double ar,sum=0;
while(1){
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf",&a[i]);
sum+=a[i];
}
printf("输入的元素为: \n");
ar=sum/n;
for(i=0;i<n;i++){
if(a[i]>=ar)
j++; printf("%.3lf ",a[i]);
}printf("\n");
printf("所有元素的平均值为:%.3lf 数组中大于等于平均值的元素个数为:%d\n",ar,j);
ar,sum=0.0,j=0; printf("输入的元素个数为为: %d \n",n);
}
return 0;
}
int main()
{
int b[100],c;
Count(b,c);
return 0;
}
</span>
<span style="font-size:18px;"><img src="https://img-blog.csdn.net/20150529105527344?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd3d3X2JpMTIxOA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
</span>