zoukankan      html  css  js  c++  java
  • 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("输入有误");
                }
            }
  • 相关阅读:
    001_jdk配置
    mysql(5.7)安装教程
    mysql(5.6)安装教程
    外网发布
    蓝桥 历届试题 分考场
    蓝桥 历届试题 合根植物
    Codeforces Round #650 (Div. 3) D : Task On The Board
    HDU 3336 Count the string
    leetcode [238. 除自身以外数组的乘积]
    leetcode [837. 新21点]
  • 原文地址:https://www.cnblogs.com/koker/p/5398048.html
Copyright © 2011-2022 走看看