您的位置:首页 > 其它

CCF—工资计算 20161202

2017-09-19 19:40 218 查看
#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;

}

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ccf