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);
           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 void printGrade3(int score){
        if (score<0 || score>100){
            System.out.println("The score is invaild");
        }
        else if (score<40){
            System.out.println("The corresponding grade is F.");
        }
        else if(score<70){
            System.out.println("The corresponding grade is B.");
        }
        else {
            System.out.println("The corresponding grade is E");
        }
    }
}