public class exercise_719_06 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
System.out.println(“请输入成绩:”);
int score = sc.nextInt();
if (score>100 ||score<0){
System.err.println(“输入有误”);
}else {
if (score >= 90) {
System.out.println(“A”);
} else if (score >= 60 && score <= 89) {
System.out.println(“B”);
}else{
System.out.println(“C”);
}
}
} catch (InputMismatchException e) {
System.err.println(“输入有错误”);
}finally {
sc.close();
}
}
}