CCF—工资计算 20161202

本文介绍了一个用于计算个人所得税的C++程序实现。该程序通过输入税前工资数额,利用中国现行税制规则,计算并输出税后实际收入。具体算法包括了不同收入段的税率及速算扣除数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#include <iostream>
using namespace std;
int main() {
    int t,s,temp; 
    cin>>t; 
int a1=1500*0.97,          b1=a1;
int a2=(4500-1500)*0.9,    b2=b1+a2;
int a3=(9000-4500)*0.8,    b3=b2+a3;
int a4=(35000-9000)*0.75,  b4=b3+a4;
int a5=(55000-35000)*0.7,  b5=b4+a5;
int a6=(80000-55000)*0.65, b6=b5+a6;
    temp=t-3500;
if(temp<0) s=t;
     else if(temp<=b1&&temp>0)  s=3500+temp/0.97;
   else if(temp<=b2&&temp>b1) s=5000+(temp-b1)/0.9;
   else if(temp<=b3&&temp>b2) s=8000+(temp-b2)/0.8;
   else if(temp<=b4&&temp>b3) s=12500+(temp-b3)/0.75;
   else if(temp<=b5&&temp>b4) s=38500+(temp-b4)/0.7;
   else if(temp<=b6&&temp>b5) s=58500+(temp-b5)/0.65;
   else if(temp>b6)           s=83500+(temp-b6)/0.55;
cout<<s<<endl;

}
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值