package cn.save;
import java.util.Scanner;
public class Dome5 {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("请输入月份:");
int month = input.nextInt();
int yj=5000;
if(month>12 || month<1){//保障输入的是1-12月
System.out.println("输出月份不合理:");
}else if(4<=month && month>=10){
System.out.println("请问您选择头等舱还是经济舱?头等舱输入1,经济舱输入2");
int sz = input.nextInt();
if(sz==1){
System.out.println(yj*0.9);
}else if(sz==2){
System.out.println(yj*0.8);
}
}else if(4>month || month<10){
System.out.println("请问您选择头等舱还是经济舱?头等舱输入1,经济舱输入2");
int sz = input.nextInt();
if(sz==1){
System.out.println(yj*0.9);
}else if(sz==2){
System.out.println(yj*0.8);
}
}
}
}