计算个人所得税

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

16计算个人所得税tax=rate*(salary-850)/100其中tax所得税salary月薪rate税率月薪rate税率salary≤8500850salary≤135051350salary≤2850102850salary≤5850155850salary20#includestdio.hvoidmain(){intsalary;floatrate,tax;printf(inputsalary=\n);scanf(%d,&salary);if(salary=850)rate=0;elseif(850salary=1350)rate=5;elseif(1350salary=2850)rate=10;elseif(2850salary=5850)rate=10;elserate=20;tax=rate*(salary-850)/100)printf(tax=%f,tax);}if(salary=850)rate=0;elseif(salary=1350)rate=5;elseif(salary=2850)rate=10;elseif(salary=5850)rate=10;elserate=20;2#includestdio.hvoidmain(){doubles,r;printf(inputs:\n);scanf(%lf,&s);if(s=850)r=0;if(850s=1350)r=5;if(1350s=2850)r=10;if(2850s=5850)r=15;if(s5850)r=20;printf(%0.2f\n,r*(s-850)/100);}850s=135010=1351if(s=850)r=0;if(850s&&s=1350)r=5;if(1350s&&s=2850)r=10;if(2850s&&s=5850)r=15;if(s5850)r=20;36计算个人所得税tax=rate*(salary-850)/100其中tax所得税salary月薪rate税率月薪rate税率500倍数salary≤8500850salary≤135051350-850=5001350salary≤2850102850-1350=15002850salary≤5850155850-2850=30005850salary20分析税率rate的变化点都是月薪salary的500倍数月薪rate税率(salary-850.001)/500+1(salary+150-0.001)/500salary≤850000,1850salary≤13505121350salary≤2850102,3,43,452850salary≤5850155,6,7,8,9,106,7,8,9,10,115850salary20=11=12?为何减去0.0014(salary+150-0.001)/500rate=0rate=5rate=10rate=15rate=20流程图tax=rate*(salary-850)/1000,123,4,56,7,8,9,10,11default#includestdio.hvoidmain(){intc,rate;floatsalary,tax;scanf(%f,&salary);c=(salary+150-0.001)/500;switch(c){case0:case1:rate=0;break;case2:rate=5;break;case3:case4:case5:rate=10;break;case6:case7:case8:case9:case10:case11:rate=15;break;default:rate=20;}tax=rate*(salary-850)/100;printf(个人所得税=%.2f\n,tax);}程序

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功