package Work; import java.util.Scanner; public class Salary { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("请输入您的工资:"); double salary = scanner.nextDouble(); double tax = 0; if (salary <= 5000) { tax = 0; } else if (salary <= 8000) { tax = (salary - 5000) * 0.03; } else if (salary <= 17000) { tax = (salary - 8000) * 0.1 + 3000 * 0.03; } else if (salary <= 30000) { tax = (salary - 17000) * 0.2 + 9000 * 0.1 + 3000 * 0.03; } else if (salary <= 40000) { tax = (salary - 30000) * 0.25 + 13000 * 0.2 + 9000 * 0.1 + 3000 * 0.03; ; } else if (salary <= 60000) { tax = (salary - 40000) * 0.3 + 10000 * 0.25 + 13000 * 0.2 + 9000 * 0.1 + 3000 * 0.03; } else if (salary <= 85000) { tax = (salary - 60000) * 0.35 + 20000 * 0.3 + 10000 * 0.25 + 13000 * 0.2 + 9000 * 0.1 + 3000 * 0.03; } else { tax = (salary - 85000) * 0.45 + 25000 * 0.35 + 20000 * 0.3 + 10000 * 0.25 + 13000 * 0.2 + 9000 * 0.1 + 3000 * 0.03; } System.out.println("您应该缴纳的个人所得税为:" + tax ); } }