解题思路:
参考代码。
注意事项:
输出放的位置。
参考代码:
#include<stdio.h>
#include <math.h>
#include <string.h>
#define N 10
int main()
{
int x=0,y=0,z=0,n;
while(1)
{
scanf("%d",&n);
if(n<=0)
{
printf(">=85:%d\n",x);
printf("60-84:%d\n",y);
printf("<60:%d\n",z);
return 0;
}
if(n>=85)
{
x++;
}
else if(n>=60)
{
y++;
}
else
{
z++;
}
}
return 0;
}
0.0分
0 人评分