怎样让这个程序可以循环,我本身已经有设置循环了且直到遇到#,但是似乎没用!
/***********************************功能:判断输入的成绩的等级 *
*作者: *
*时间:2014\03\27 *
* *
**********************************/
#include <stdio.h>
#include <ctype.h>
int main (void)
{
int score ; //表示输入的成绩
printf("Please enter score:");
scanf("%d",&score);
while (score != '#')
{
if(score < 0 || score>100)
printf("The score is fault.\n");
else
{
switch(score / 10)
{
case 10 :
printf("This student's score is %d and his grade is A .\n ",score);
break ;
case 9 :
printf("This student's score is %d and his grade is A .\n ",score);
break ;
case 8 :
printf("This student's score is %d and his grade is B .\n ",score);
break ;
case 7 :
printf("This student's score is %d and his grade is C .\n ",score);
break ;
case 6 :
printf("This student's score is %d and his grade is D .\n ",score);
break ;
default:
printf("This student's score is %d and his grade is E .\n ",score);
break ;
}
break;
}
scanf("%d",&score);
continue ;
}
return 0;
}