#include <stdio.h>
int main ()
{
double score;
printf("please enter score:\n");
scanf("%if",&score);
if(score>100||score<0)
{
printf("error!\n please again!\n");
scanf("%if",&score);
}
switch ((int)score/10)
{
case 0:printf("E\n");break ;
case 1:printf("E\n");break ;
case 2:printf("E\n");break ;
case 3:printf("E\n");break ;
case 4:printf("E\n");break ;
case 5:printf("E\n");break ;
case 6:printf("D\n");break ;
case 7:printf("C\n");break ;
case 8:printf("B\n");break ;
case 9:printf("A\n");break ;
case 10:printf("A\n");break ;
}
return 0;
}
慕用4063026
木柘
ASLyo
相关分类