rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 10370 : Above Average

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Solution 10370 : Above Average

#include<stdio.h>

int main()

{
    int a[1000],i,c,d,count,m;
    float avr,k,n,j;
   while( scanf("%d",&c)==1)
   {

     for(d=1;d<=c; d++)

    {
        avr=0;
count=0;
k=0;
    scanf("%f",&j);


    for(i=0;i<j;i++)
                    {
                scanf("%d",&a[i]);
                k=k+a[i];
                    }
        avr=k/j;

    for(m=0;m<j;m++)
            {

    if(a[m]>avr)
    count=count+1;

            }
    n=(100*count)/j;
     printf("%.3f%%\n",n);
    }
    }
return 0;
}

No comments:

Post a Comment