实训
0123
import java.util.Scanner; public class Identifydemo3 { public static void main(String[] args) { System.out.println("请输入您的薪水:"); Scanner sc = new Scanner(System.in); double salary = sc.nextDouble(); double x = 0; //薪水超过起征点的部分 double over = salary - 5000; if (over <= 0) { x = 0; } else if (over <= 3000) { x = over * 0.03; } else if (over <= 12000) { x = over * 0.1; } else if (over <= 25000) { x = over * 0.2; } else if (over <= 35000) { x = over * 0.25; } else if (over <= 55000) { x = over * 0.3; } else if (over <= 80000) { x = over * 0.35; } else { x = over * 0.45; } System.out.println("个人所得税为:" + x); } }