若第二个用switch语句,case后的常量表达式不好写吧


第二题小弟我投机取巧,大家不要骂好吗?
#include <stdio.h>
#include <conio.h>
main()
{
int i;
char grade='A';
float score,gate=90;
system("cls");
printf("Please input the score:");
scanf("%f",&score);
for (i=0;i<4;i++,gate-=10,grade++)
if (score>=gate)
break;
printf("\nscore=%g\tgrade=%c",score,grade);
getch();
return 0;
}
很好写啊!!
在表达式里面用成绩/10,
case表达式后面就可以直接用9,8,7,6,5,4,3,2,1,0了啊!!!!