?? 2350.cpp
字號(hào):
#include<cstdio>
int main()
{
int n;
int m;
int count;
float sum;
float *score;
float average;
scanf("%d", &n);
for(int i = 0; i < n; i++)
{
scanf("%d", &m);
score = new float[m];
sum = 0;
count = 0;
for(int j = 0; j < m; j++)
{
scanf("%f", &score[j]);
sum = sum + score[j];
}
average = sum/m;
for(j = 0; j < m; j++)
{
if(score[j] > average)
count++;
}
printf("%.3f%%\n", (float)count/m*100);
}
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -