package com.wenku.www;
import java.util.Scanner;
public class ShunXUDemo {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
System.out.println("输入成绩");
double d=scanner.nextDouble();
if(d==100){
System.out.println("满分");
}else if(d>=90&& d<=100){
System.out.println("优秀");
}else if(d>=60&& d<=90){
System.out.println("及格");
}else if(d<60&& d>=0){
System.out.println("不及格");
}else {
System.out.println("数字不合法");
}
scanner.close();
}
}
JAVA if else 语句
最新推荐文章于 2024-08-30 22:17:40 发布