//filename: T4_1.java
import java.util.*;
public class T4_1
{
public static void main(String[] args)
{
int score;
Scanner reader = new Scanner(System.in);
System.out.print (“请输入成绩:”);
score = reader.nextInt();
int a =score/10;
switch(a)
{
case 10:
case 9:
System.out.print(“等级为:优”);
break;
case 8:
System.out.print(“等级为:良”);
break;
case 7:
System.out.print(“等级为:中”);
break;
case 6:
System.out.print(“等级为:及格”);
break;
default:
System.out.println(“等级为:不及格”);
}
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)