多重if MultipleIf.java
import java.util.*;
public class MultipleIf{
//多重if
public static void main(String[] args){
Scanner in=new Scanner(System.in);
System.out.println("请输入你成绩:");
int grade=in.nextInt();
/*if(grade>90){
System.out.println("优秀");
}
if(90>grade&&grade>80){
System.out.println("良好");
}
if(80>grade&&grade>60){
System.out.println("中等");
}
if(grade<60){
System.out.println("不及格");}
*/
if(grade>=90){
System.out.println("优秀");
}else if(grade>80){
System.out.println("良好");
}else if(grade>60){
System.out.println("中等");
}else if(grade<60){
System.out.println("不及格");
}else{
System.out.println("正在测试");}
}
}