package cn.itbaizhan; import java.util.Scanner; public class zuoyeg_gesui { public static void main(String[] args) { System.out.println("====个税计算器===="); Scanner scanner = new Scanner(System.in); for (; ; ) { System.out.println("请输入你的月薪:"); double yuexing = scanner.nextInt(); double jiao = yuexing - 5000; double shui = 0; if (jiao <= 5000) { System.out.println("个税少于或等于5000不用交税!"); } else if (jiao <= 12000) { shui = jiao*0.1-210; yuexing -= shui; } else if (jiao <=25000){ shui = jiao*0.2-1410; yuexing -= shui; }else if (jiao <= 35000){ shui = jiao*0.25-2660; yuexing -= shui; }else if (jiao < 55000){ shui = jiao*0.3-4410; yuexing -= shui; }else if (jiao < 80000){ shui =jiao*0.35-7160; yuexing -= shui; }else if (jiao < 100000){ shui = jiao*0.45-15160; yuexing -= shui; } System.out.println("应交税工资:"+jiao+"\t"+"因纳税:"+shui+"实际工资:"+yuexing); System.out.println("请输入你的命令:");//输入exit直接退出,其他任意字符则继续; System.out.println("exit,退出"+"\t"+"任意字符继续"); String com = scanner.next(); System.out.println("================="+com+"================"); if (com.equals("exit")){ System.out.println("程序执行完毕,退出!!"); break; }else { continue; } } } }
菜鸟码字!!!!
最新推荐文章于 2025-05-03 10:56:02 发布