import java.util.Scanner; public class test5 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); System.out.println("请输入成绩:"); int score=sc.nextInt(); if(score>=90&&score<=100){ System.out.println("你的成绩等级为:A"); }if(score>=80&&score<=89){ System.out.println("你的成绩等级为:B"); } if(score>=70&&score<=79){ System.out.println("你的成绩等级为:C"); } if(score>=60&&score<=69){ System.out.println("你的成绩等级为:D"); }if(score>=0&&score<60){ System.out.println("你的成绩等级为:E"); }else{ System.out.println("考试成绩输入有误"); } } }