package lianxi;
import java.util.*;
public class Xvexichengji {
public static void main(String[] args) {
System.out.println("输入姓名");
Scanner xingming = new Scanner(System.in);
String ren = xingming.next();
System.out.println("输入成绩");
while (true) {
Scanner chengji = new Scanner(System.in);
Double shu = chengji.nextDouble();
if (shu > 100 || shu < 0) {
System.out.println("输入的成绩有误,请重新输入");
continue;
} else {
if (shu >= 90) {
System.out.println(ren+"的成绩为A");
break;
} else if (shu < 60) {
System.out.println(ren+"的成绩为C");
break;
} else {
System.out.println(ren+"的成绩为B");
break;
}
}
}
}
}