个人所得税收税标准
程序代码
#include <stdio.h>
#include <stdlib.h>
/*
*csdn学院——2016级
*文件名称:Myfun28.c
*作者:小臣小仁
*完成日期:2016年11月11日
*问题描述:编写选择结构程序,
*输入个人月收入总额,计算出他本
*月应缴税款和税后收入(计算办法
*见附:关于个人所得税的有关背景知识)。
*/
int main()
{
float fTotal,fIncome,fDiff,fStart=3500;
printf("请输入总额:");
scanf("%f",&fTotal);
if(fTotal>fStart)
{
fDiff=fTotal-fStart;
if(fDiff<=1500)
fIncome=fDiff*0.03;
else if(fDiff<=4500)
fIncome=fDiff*10/100-105;
else if(fDiff<=9000)
fIncome=fDiff*20/100-555;
else if(fDiff<=35000)
fIncome=fDiff*25/100-1005;
else if(fDiff<=55000)
fIncome=fDiff*35/100-5505;
else
fIncome=fDiff*45/100-13505;
printf("%.4f\n",fIncome);
}
else
printf("不需要缴纳税收\n");
return 0;
}
输出结果
知识点总结:
这和上次的分段函数用到差不多的方法。
心得体会:
把课堂上教的来解决现实生活中问题,感觉自己棒棒哒
![吐舌头](http://static.blog.csdn.net/xheditor/xheditor_emot/default/tongue.gif)