Define an array to store 10 integers. The user inputs 10 values ??and stores them in the array. Calculate the average and count the number below the average.
Please adopt if you are satisfied
main()
{
int a[10],i,sum=0,x=0 ;/*Initialization value*/
for(i=0;i<10;i++)
{
scanf("%d",&a[ i]);/*Enter numerical value*/
sum=sum+a[i];/*Total statistical value*/
}
for( i=0;i<10;i++)
if(a[i]<(sum/10)) x++;/*Calculate the number below the average*/
printf("x=%d",sum);/*output result*/
getch();
}