菜鸟码字!!!!

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;
            }



        }

    }
}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值