VS 应用模板 所交税和实发工资的运算
double SFGZ, SL, SSKCS, YFGZ,a,YJS; //应发工资(基本工资),税率,速算扣除数,应发工资,判断标准,交多少税 //double QZD = 3500;//起征点 无用 Console.Write("请输入你的工资数:"); YFGZ= Convert.ToDouble( Console.ReadLine()); //(应发工资-3500)*税率-速算扣除数=应交多少税 //<=1500 3% 0 //1500<a<=4500 10% 105 //4500<a<=9000 20% 555 //9000<a<=35000 25% 1005 //35000<a<=55000 30% 2755 //55000<a<=80000 35% 5505 //80000<a 45% 13505 a=YFGZ-3500; if(YFGZ>=3500) { if(a<=1500) { SL = 0.03; SSKCS = 0; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:"+YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:" + SFGZ); } else if(a>1500&&a<=4500) { SL = 0.1; SSKCS = 105; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:" + YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:" + SFGZ); } else if (a > 4500 && a <= 9000) { SL = 0.2; SSKCS = 555; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:" + YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:" + SFGZ); } else if (a > 9000 && a <= 35000) { SL = 0.25; SSKCS = 1005; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:" + YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:"+SFGZ); } else if (a > 35000 && a <= 55000) { SL = 0.3; SSKCS = 2755; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:" + YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:" + SFGZ); } else if (a > 55000 && a <= 80000) { SL = 0.35; SSKCS = 5505; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:" + YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:" + SFGZ); } else if (a > 80000) { SL = 0.45; SSKCS = 13505; YJS = (YFGZ - 3500) * SL - SSKCS; Console.WriteLine("您所交的税是:" + YJS); SFGZ = YFGZ + YJS; Console.WriteLine("您的应发工资是:" + SFGZ); } } else { Console.WriteLine("你不用交税!"); }
2016.4.16 孤独夜莺 编辑
o0孤独夜莺0o