解题思路:
注意事项:
参考代码:
#include<stdio.h>
int main()
{
float grade;
int a = 0, b = 0, c = 0;
while (scanf("%f", &grade))
{
if (grade <= 0)
break;
if (grade >= 85)
a++;
else if (grade < 60)
c++;
else
b++;
}
printf(">=85:%d\n", a);
printf("60-84:%d\n", b);
printf("<60:%d", c);
return 0;
}
0.0分
0 人评分