switch语句
下面的语句为什么执行起来老不成功啊?检查了好几次了,没检查出来什么问题。main()
{int e;float score;char grade;
printf ("please input score:\n");
scanf ("%f",&score);
if (score>100||score<0) {printf ("data is error\n"); e=1;}
swith (score/10)
{case 10:
case 9: grade='A';break;
case 8: grade='B';break;
case 7: grade='C';break;
case 6: grade='D';break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0: grade='E';break;}
if (e==0) printf ("result is %f,grade is %c\n",score,grade);
getch();}