package Test;
import java.util.Scanner;
public class Test1 {
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 + 90;
}
else if (salary <= 30000) {
tax = (salary - 17000) * 0.2 + 990;
}
else if (salary <= 40000) {
tax = (salary - 30000) * 0.25 + 3590;
}
else if (salary <= 60000) {
tax = (salary - 40000) * 0.3 + 6590;
}
else if (salary <= 85000) {
tax = (salary - 60000) * 0.35 + 12590;
}
else {
tax = (salary - 85000) * 0.45 + 19590;
}
System.out.println("您的个人所得税为:" + tax);
}
}
JAVA实训Day2
最新推荐文章于 2024-07-10 21:37:49 发布