public class HomeWork {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("请输入您的工资金额:");
double salary = scanner.nextDouble();
double taxableIncome = salary - 5000;
double tax = 0;
if (taxableIncome <= 0) {
tax = 0;
} else if (taxableIncome <= 3000) {
tax = taxableIncome * 0.03;
} else if (taxableIncome <= 12000) {
tax = taxableIncome * 0.1 - 210;
} else if (taxableIncome <= 25000) {
tax = taxableIncome * 0.2 - 1410;
} else if (taxableIncome <= 35000) {
tax = taxableIncome * 0.25 - 2660;
} else if (taxableIncome <= 55000) {
tax = taxableIncome * 0.3 - 4410;
} else if (taxableIncome <= 80000) {
tax = taxableIncome * 0.35 - 7160;
} else {
tax = taxableIncome * 0.45 - 15160;
}
System.out.println("您的个人所得税为:" + tax);
}
}