辅导计划
include<stdio.h>
int main()
{int n,a[100],i,sum;
while(scanf("%d",&n)!=EOF)
{sum=0;
for(int i=0;i<n;i++)
{scanf("%d",&a[i]);
sum+=a[i];}
for(i=0;i<n;i++)
{if((double)a[i]<(double)sum/n)
{printf("%d ",a[i]);}}
printf("\n");}}
int main()
{int n,a[100],i,sum;
while(scanf("%d",&n)!=EOF)
{sum=0;
for(int i=0;i<n;i++)
{scanf("%d",&a[i]);
sum+=a[i];}
for(i=0;i<n;i++)
{if((double)a[i]<(double)sum/n)
{printf("%d ",a[i]);}}
printf("\n");}}
相关推荐