Scanner sc = new Scanner(System.in);
Integer achievement = 0;
while(achievement != -1) {
System.out.println("请输入成绩(输入-1停止):");
achievement = sc.nextInt();
if(achievement >= 0 && achievement < 60) {
System.out.println("不及格");
}else if(achievement >= 60 && achievement < 80) {
System.out.println("中");
}else if(achievement >= 80 && achievement < 90) {
System.out.println("良");
}else if(achievement >= 90 && achievement < 100) {
System.out.println("优");
}else if(achievement == 100) {
System.out.println("牛");
}else if(achievement > 100) {
System.out.println("上天了");
}
}