import java.util.Scanner;
public class SwitchDome {
public static void main(String[] args) {
Scanner but = new Scanner(System.in);
System.out.println("请输入您的分数:");
int data_but = but.nextInt();
switch(data_but)
{
case 90:
System.out.println("优秀");
break;
case 80:
System.out.println("良好");
break;
case 70:
System.out.println("一般");
break;
case 60:
System.out.println("及格");
break;
default:
System.out.println("继续努力");
}
}
}
Java简单的switch使用
发布于 2022-11-30 95 次阅读
Comments NOTHING