public class test6 {
public static void main(String[]args){
System.out.println("Please enter an No.");
Scanner scanner=new Scanner(System.in);
int score=scanner.nextInt();
switch (score) {
case 5:
System.out.println("very good");
break;
case 4:
System.out.println("good");
break;
case 3:
System.out.println("not good");
break;
case 2:
case 1:
System.out.println("bad");
break;
default:
System.out.println("the input method is not right");
}
}
}
为什么运行不下去呢,编译好像没错。。。
而且显示的是错在switch(score)那一行
|
|