package cn.jc.output;
import java.util.Scanner;
public class Threechapterwork {
public static void main(String[] args) {
Scanner input= new Scanner(System.in);
System.out.println("请输入年龄:");
int age = input.nextInt();
System.out.println("请输入性别:");
String sex = input.next();
if(age>=7) {
System.out.println("能抬动桌子");
}else if(age>=5 && sex.equals("男")) {
System.out.println("能抬动桌子");
}else {
System.out.println("不能抬动桌子");
}
System.out.println("\n");
System.out.println("请输入会员积分:");
int integral = input.nextInt();
if(integral<2000) {
System.out.println("该会员享受的折扣是:0.9");
}else if(integral>=2000&& integral<4000) {
System.out.println("该会员享受的折扣是:0.8");
}else if(integral>=4000 && integral<8000) {
System.out.println("该会员享受的折扣是:0.7");
}else if(integral>=8000) {
System.out.println("该会员享受的折扣是:0.6");
}
System.out.println("\n");
int ticket = 5000;
System.out.println("请输入您出行的月份:1~12");
int month = input.nextInt();
System.out.println("请问您选择头等舱还是经济舱?头等舱请输入1,经济舱请输入2");
int grade = input.nextInt();
System.out.println("您的机票价格为:");
int money;
if (month>=4 && month<=10 && grade == 1) {
System.out.println(ticket*0.9);
}else if(month>=4 && month<=10 && grade == 2) {
System.out.println(ticket*0.8);
}else if(grade == 1) {
System.out.println(ticket*0.5);
}else if(grade == 2) {
System.out.println(ticket*0.4);
}
System.out.println("\n");
System.out.println("请输入星期几:");
int week = input.nextInt();
switch (week){
case 1:
System.out.println("学习编程");
break;
case 2:
System.out.println("学习英语");
break;
case 3:
System.out.println("学习编程");
break;
case 4:
System.out.println("学习英语");
break;
case 5:
System.out.println("学习编程");
break;
case 6:
System.out.println("学习英语");
break;
case 7:
System.out.println("今日休息");
break;
default:
System.out.println("输入错误,请重新输入");
break;
}
}
}