//import java.util.Scanner;
public class Switch0726a {
public static void main(String[] args) {
java.util.Scanner s = new java.util.Scanner(System.in);
System.out.print("请输入你的成绩:");
double num1 = s.nextDouble();
int grdae = (int)(num1/10);
switch(grdae){
case 9:case 10:
System.out.println("A");
break;
case 8:
System.out.println("B");
break;
case 7:
System.out.println("C");
break;
case 6:
System.out.println("D");
break;
default:
System.out.println("E");
}
}
}
原文地址:https://www.cnblogs.com/zhuojinyong/p/11605637.html
时间: 2024-10-14 00:28:43