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("输入有误"); } }