-
Notifications
You must be signed in to change notification settings - Fork 14
/
10370.cpp
33 lines (29 loc) · 862 Bytes
/
10370.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int C,N,i=0,j=0;
float marks[100],avg=0,sum=0,count=0,res=0;
cin>>C;
for(i=0;i<C;i++)
{
count=0,N=0,avg=0,sum=0,res=0;
cin>>N;
for(j=0;j<N;j++)
{
cin>>marks[j];
sum+=marks[j];
}
avg=sum/N;
for(j=0;j<N;j++)
{
if(marks[j]>avg)
count++;
}
res=(count/N)*100;
printf("%.3f",res);
cout<<"%"<<endl;
}
return 0;
}