其他分享
首页 > 其他分享> > 个人所得税计算器

个人所得税计算器

作者:互联网

import java.util.Scanner;

/**
 * 1、全月应纳税所得额=税前收入-专项扣除(三险一金等)-起征点(5000元)
 * 2、缴税=全月应纳税所得额×税率-速算扣除数
 * 1、全月应纳税所得额不超过3000元:
 * 税率:3%;速算扣除数(元):0
 * 2、全月应纳税所得额超过3000元至12000元:
 * 税率:10%;速算扣除数(元):210
 * 3、全月应纳税所得额超过12000元至25000元:
 * 税率:20%;速算扣除数(元):1410
 * 4、全月应纳税所得额超过25000元至35000元:
 * 税率:25%;速算扣除数(元):2660
 * 5、全月应纳税所得额超过35000元至55000元:
 * 税率:30%;速算扣除数(元):4410
 * 6、全月应纳税所得额超过55000元至80000元:
 * 税率:35%;速算扣除数(元):7160
 * 7、全月应纳税所得额超过80000元:
 * 税率:45%;速算扣除数(元):15160
 *
 */
//个税计数器
public class Geshui {
    public static void main(String[] args) {
        Scanner  scanner =  new Scanner(System.in);
        System.out.println("个税计算机器");
        while(true){
            System.out.println("请输入月薪!");
            double yuexin = scanner.nextInt();
            scanner.nextLine();
            double jiao = yuexin - 5000;
            double shui = 0;

            if(jiao<0){
                System.out.println("起征点5000以下,不需要交税");

            }
            else if(jiao<3000){
                shui=jiao*0.03-0;
                yuexin-=shui;
                System.out.println("您应交税为:"+shui);
                System.out.println("您本月到手工资为:"+yuexin);
            }else if(jiao>=3000&&jiao<12000){
                shui=jiao*0.1-210;
                yuexin-=shui;
                System.out.println("您应交税为:"+shui);
                System.out.println("您本月到手工资为:"+yuexin);

            }else if(jiao>=12000&&jiao<25000){
                shui=jiao*0.2-1410;
                yuexin-=shui;
                System.out.println("您应交税为:"+shui);
                System.out.println("您本月到手工资为:"+yuexin);
            }else if(jiao>=25000&&jiao<35000){
                shui=jiao*0.25-2660;
                yuexin-=shui;
                System.out.println("您应交税为:"+shui);
                System.out.println("您本月到手工资为:"+yuexin);
            }else if(jiao>=35000&&jiao<55000){
                shui=jiao*0.3-4410;
                yuexin-=shui;
                System.out.println("您应交税为:"+shui);
                System.out.println("您本月到手工资为:"+yuexin);
            }else if(jiao>=55000&&jiao<80000) {
                shui = jiao * 0.35 - 7160;
                yuexin -= shui;
                System.out.println("您应交税为:" + shui);
                System.out.println("您本月到手工资为:" + yuexin);
            }else if(jiao>=80000) {
                shui = jiao * 0.45 - 15160;
                yuexin -= shui;
                System.out.println("您应交税为:" + shui);
                System.out.println("您本月到手工资为:" + yuexin);
            }

            System.out.println("请输入命令next/exit");
            String minglin =scanner.nextLine();
            System.out.println(minglin);
            if("exit".equals(minglin)){
                System.out.println("退出程序!");
                break;
            }
            if("next".equals(minglin)){
                System.out.println("继续计算下一位");
                continue;
            }

        }



    }
}

标签:全月应,速算,System,个人所得税,计算器,println,所得额,out
来源: https://blog.csdn.net/qq_48763564/article/details/122643528