• VS学习4——计算工资与扣税


            static void Main(string[] args)
            {
                double shifa, shuilv, yingfa, sukou, koushui, a;
                double qizheng = 3500;
    
    
    
                Console.WriteLine("请输入你的发应工资");
                yingfa = Convert.ToDouble(Console.ReadLine());
                a = yingfa - qizheng;//*****差值*****
    
    //分两个阶段高于3500和低于3500
                if (a <= 0 && a > -1500)
                {
                    Console.WriteLine("buyong");
                }
    
                else if (a > 0 && a <= 1500)        //     <=1500        3%    0       
                {
                    sukou = 0; shuilv = 0.03;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的应发工资和扣税是:{0},{1}", shifa, koushui);
                }
                else if (a > 1500 && a <= 4500)   //1500<a<=4500    10%    105
                {
                    sukou = 105; shuilv = 0.1;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的发工资和扣税是:{0},{1}", shifa, koushui);
                }
    
                else if (a > 4500 && a <= 9000)//4500<a<=9000    20%    555
                {
                    sukou = 555; shuilv = 0.2;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的应发工资和扣税是:{0},{1}", shifa, koushui);
                }
                else if (a > 9000 && a <= 35000)  //9000<a<=35000    25%    1005
                {
                    sukou = 1005; shuilv = 0.25;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的应发工资和扣税是:{0},{1}", shifa, koushui);
                }
                else if (a > 35000 && a <= 55000)//35000<a<=55000    30%    2755
                {
                    sukou = 2755; shuilv = 0.3;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的应发工资和扣税是:{0},{1}", shifa, koushui);
                }
                else if (a > 55000 && a <= 80000)//55000<a<=80000    35%    5505
                {
                    sukou = 5505; shuilv = 0.35;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的应发工资和扣税是:{0},{1}", shifa, koushui);
                }
                else if (a > 80000)//80000<a        45%    13505
                {
                    sukou = 13505; shuilv = 0.45;
                    koushui = a * shuilv - sukou;
                    shifa = yingfa + koushui;
                    Console.WriteLine("你的应发工资和扣税是:{0},{1}", shifa, koushui);
                }
                else
                {
                    Console.WriteLine("输入有误");
                }
            }
  • 相关阅读:
    删除 AP 发票相关脚本
    js框架简明
    16 款最流行的 JavaScript 框架
    八款你不得不知的开源前端JS框架
    ExtJS面向对象
    js6类和对象
    js模拟类
    js实现继承
    Html中各种空格的显示
    常用快速原型设计工具大比拼、原型设计工具哪个好用
  • 原文地址:https://www.cnblogs.com/koker/p/5398048.html
Copyright © 2020-2023  润新知