java E201_02_01个人所得税 计算器

 

package 第二章选择结构;
import java.util.Scanner;
public class E201_02_08个税计算器 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.printf("请输入工资数:");
        double wages =scan.nextFloat();//工资
        double taxableIncome ;//应纳税所得额
        double taxAmount;//个税额
        double other;//超出的部分
        taxableIncome = wages-4200;//应纳税所得额 = (应发工资wages-四金700)-3500
        //个税额 = 应纳税所得额 *税率-速算扣除数

        if (taxableIncome<=1500) taxAmount = taxableIncome*0.03-0;
        else if ( taxableIncome>1500 && taxableIncome<=4500 ) taxAmount = (taxableIncome)*0.1-105;
        else if ( taxableIncome>4500 && taxableIncome<=9000 ) taxAmount = (taxableIncome)*0.2-555;
        else if ( taxableIncome>9000 && taxableIncome<=35000 ) taxAmount = (taxableIncome)*0.25-1005;
        else if ( taxableIncome>35000 && taxableIncome<=55000 ) taxAmount = (taxableIncome)*0.3-2755;
        else if ( taxableIncome>55000 && taxableIncome<=80000 ) taxAmount = (taxableIncome)*0.35-5505;
        else
            taxAmount = (taxableIncome)*0.45%-13505;

        System.out.printf("个税额:%f\n",taxAmount);
        System.out.printf("应到工资:%f",wages-taxAmount-700);
    }
}

 

发布了24 篇原创文章 · 获赞 24 · 访问量 5931
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 技术工厂 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览