Problem1068--统计各成绩段的学生人数

1068: 统计各成绩段的学生人数

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 49  Solved: 23
[Submit] [Status] [Web Board] [Creator:]

Description

编写程序,输入一批学生的成绩,遇0或负数则输入结束,要求统计并输出优秀(大于85)、通过(6084)和不及格(小于60)的学生人数。

提示:

我们可以用三个变量 a b c 来表示各个分数段的人数。

int a, b c;

a = b = c = 0;

最后打印输出使用如下语句:

printf(">=85:%d\n", a);

学生的成绩可以定义在整型变量 score

int score;

Input

 程序的框架如下:

int score;

scanf("%d", &score);

while (score>0) {

if ()  ...;

if ()  ...;

if ()  ...;

scanf("%d", &score);

}

printf(。。。);

printf(。。。);

Sample Input

88 71 68 70 59 81 91 42 66 77 83 0

Sample Output

>=85:2
60-84:7
<60:2