import java.util.Scanner;
public class PrintGrade{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int sc;
System.out.println("please enter your score:");
sc = input.nextInt();
while (sc!=999){
//printGrade3(sc);
String s=printGrade3s(sc);
System.out.println(s);
System.out.println("please enter your score:");
sc = input.nextInt();
}
/*固定次数循环
for(int i=0;i<3;i++){
System.out.println("please enter your score:");
sc = input.nextInt();
printGrade3(sc); //调用方法
}*/
}
public static String printGrade3s(int score){
if (score<0 || score>100){
return"The score is invaild.";
}
else if (score<40){
return"The corresponding grade is F.";
}
else if(score<70){
return"The corresponding grade is B.";
}
else {
return"The corresponding grade is E.";
}
}
}