• 工资计算


    问题链接:http://115.28.138.223/view.page?gpid=T51

    #include <stdio.h>
    
    int main(){
        int at_wage,S;
        scanf("%d",&at_wage);
        if(at_wage <= 3500)
            printf("%d
    ",S = at_wage);
        else if(at_wage <= 4955){//3500+1500-45
            printf("%d
    ",S = (3500 + (at_wage-3500)*100/97)); //税前工资为一个整百的数,所以一定可以整除
        }
        else if(at_wage <= 7655){//4955+3000-300
            printf("%d
    ",S = 5000+(at_wage-4955)*100/90);
        }
        else if(at_wage <= 11255){//7655+4500-900
            printf("%d
    ",S = 8000+(at_wage-7655)*100/80);
        }
        else if(at_wage <= 30755){//11255+26000-6500
            printf("%d
    ",S = 12500+(at_wage-11255)*100/75);
        }
        else if(at_wage <= 44755){//30755+20000-6000
            printf("%d
    ",S = 38500+(at_wage-30755)*100/70);
        }
        else if(at_wage <= 61005){//44755+25000-8750
            printf("%d
    ",S = 58500+(at_wage-44755)*100/65);
        }
        else{ 
            printf("%d
    ",S = 83500+(at_wage-61005)*100/55);
        }
        return 0;
    }
  • 相关阅读:
    Unreal中的python开发
    2022.5.16
    2022.5.18
    2022.5.4
    2022.5.2
    2022.5.6
    2022.5.14
    2022.4.30
    2022.5.10
    2022.5.8
  • 原文地址:https://www.cnblogs.com/emptyCoder/p/6254420.html
Copyright © 2020-2023  润新知