package com.itheima.text;
import java.util.Scanner;
public class text05 {
public static void main(String[] args) {
double money2 = 0;
double money3 = 0;
Scanner sc = new Scanner(System.in);
System.out.println("请输入你的税前工资:");
double money1 = sc.nextInt();
money1 = money1 - money1 * 0.1;
if (money1 > 5000) {
if (money1 - 5000 > 0 && money1 - 5000 <= 3000) {
money2 = (money1 - 5000) * 0.03;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
} else if (money1 - 5000 > 3000 && money1 - 5000 <= 12000) {
money2 = 3000 * 0.03 + (money1 - 5000 - 3000) * 0.1;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
} else if (money1 - 5000 > 12000 && money1 - 5000 <= 25000) {
money2 = 3000 * 0.03 + 9000 * 0.1 + (money1 - 5000 - 12000) * 0.2;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
} else if (money1 - 5000 > 25000 && money1 - 5000 <= 35000) {
money2 = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + (money1 - 5000 - 25000) * 0.25;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
} else if (money1 - 5000 > 35000 && money1 - 5000 <= 55000) {
money2 = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + 10000 * 0.25 + (money1 - 5000 - 35000) * 0.3;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
} else if (money1 - 5000 > 55000 && money1 - 5000 <= 80000) {
money2 = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + 10000 * 0.25 + 20000 * 0.3 + (money1 - 5000 - 55000) * 0.35;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
} else if (money1 - 5000 > 80000) {
money2 = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + 10000 * 0.25 + 20000 * 0.3 + 25000 * 0.35 + (money1 - 5000 - 80000) * 0.45;
money3 = money1 - money2;
System.out.println("你的税后工资为:" + money3);
}
} else {
money3 = money1;
System.out.println("你的税后工资为:" + money3);
}
}
}