UVA 10370 - Above Average
Problem PDF
Solution:
#include
int main()
{
int a[1020],i,c,d,e,m;
float w,k,n,j;
while( scanf("%d",&c)==1)
{
for(d=1;d<=c; d++)
{
w=0;
e=0;
k=0;
scanf("%f",&j);
for(i=0;iw)
e=e+1;
}
n=(100*e)/j;
printf("%.3f%%\n",n);
}
}
return 0;
}