/*
*Copyright(c)2014,烟台大学计算机学院
*All rights reserved.
*文件名称:test.cpp
*作者:满星辰
*完成日期:2014年 10月 16日
*版本号:v1.0
*
*问题描述:输入个人的月输入,根据国家的有关规定,计算出需要缴纳的个人所得税和税后收入
*输入描述:一个浮点数,代表了月收入
*程序输出:两个浮点数,分别代表了应缴的个人所得税和税后收入
*/
#include <iostream>
#include <cmath>
using namespace std;</p><p>int main()
{
double dSalary,dTax=0,dNetIncome=0,t;
cout<<"请输入您本月的收入总额(元):";
cin>>dSalary;
t=dSalary-3500;
if(t<=0)
cout<<" "<<endl;
else if(t<=1500) dTax=t*0.03;
else if(t<=4500) dTax=t*0.1;
else if(t<=9000) dTax=t*0.2;
else if(t<=35000) dTax=t*0.25;
else if(t<=55000) dTax=t*0.3;
else if(t<=80000) dTax=t*0.35;
else
dTax=t*0.45;
dNetIncome=dSalary-dTax;
cout<<"您本月应缴的个人所得税为:"<<dTax<<"元,税后收入是"<<dNetIncome<<"元。"<<endl;
cout<<"依法纳税,共享繁荣。谢谢使用!\n";
return 0;
}