package shiyue21;
import java.util.Scanner;
public class text3 {
public static void main(String[] args) { // TODO Auto-generated method stub
//判斷大學生體側項目中立定跳遠成績的等級 //等級划分規則: //男生版等級 : 不及格( length ≤ 205 )、及格( 210 ≤ length ≤ 246 )、良好( 250 ≤ length ≤ 258 )、優秀 //( 265 ≤ length ) //女生版等級 : 不及格( length ≤ 147 )、及格( 152 ≤ length ≤ 179 )、良好( 182 ≤ length ≤ 189 )、優秀 //( 196 ≤ length )
//程序執行流程:首先提示用戶輸入被判斷學生的性別,然后提示用戶輸入測試成績,最后輸出學生立定跳遠的測試成績的等級
Scanner input = new Scanner(System.in);
System.out.println("boy or girl)");
String str=input.nextLine();
System.out.println("請輸入成績");
double score=input.nextDouble();
System.out.println(score);
if(str.equals("boy")){
if(score<=205){
System.out.println("不及格");
}else if(score>=205&&score<=246){
System.out.println("及格");
}else if(score>=246&&score<=258){
System.out.println("良好");
}else {
System.out.println("優秀");
}
}else{
if(score<=147){
System.out.println("不及格");
}else if(score>147&&score<=179){
System.out.println("及格");
}else if(score>179&&score<=189){
System.out.println("良好");
}else {
System.out.println("優秀");
}
}
}
}