#include<stdio.h>
int main()
{
int A = 0 , B = 0 ,C = 0 , D = 0 , E = 0;
int N = 0, score, i = 0;
scanf("%d", &N);//人数
for(i = 1; i <= N; i++)
{
scanf("%d", &score);//成绩
if(score >= 90)
A++;
else if(score >= 80&&score < 90)
B++;
else if(score >= 70&&score < 80)
C++;
else if(score >= 60&&score < 70)
D++;
else if(score < 60)
E++;
}
printf("%d %d %d %d %d", A, B, C, D, E);
return 0;
}
PTA5-6 统计学生成绩 (15分)
最新推荐文章于 2023-11-13 10:58:55 发布