#include<stdio.h>
#define l 10
void main(void)
{
int i;
float score[l],a,b,c,d,e;
a=0;b=0;c=0;d=0;e=0;
for(i=0;i<l;i++)
{
printf("score[%d]=?",i);
scanf("%f",&score[i]);
}
for(i=0;i<l;i++)
{
if(score[i]>=90) a++;
else if(score[i]>=80) b++;
else if(score[i]>=70) c++;
else if(score[i]>=60) d++;
else e++;
}
printf("%f \n",(a/N)*100);
printf("%f \n",(b/N)*100);
printf("%f \n",(c/N)*100);
printf("%f \n",(d/N)*100);
printf("%f \n",(e/N)*100);
}
07-10
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-22
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)