package com.company;
import java.util.Scanner;
public class SwhileDemo {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
System.out.println("请输入0-100的分数");
int score = sc.nextInt();
if(score<0||score>100){
System.out.println("输入有误,请重新输入");continue;
}
if (score > 90) {
System.out.println('A');
} else if (score >= 80 && score <= 89) {
System.out.println('B');
} else if (score >= 70 && score <= 79) {
System.out.println('C');
} else if (score >= 60 && score <= 69) {
System.out.println('D');
} else {
System.out.println('E');break;
}
}
}