Sunday, June 12, 2016

SOLUTION OF URI 1048


// 1048  (Mahmud_Jamil) BRUR
//   question of  1048 Salary Increase



#include<stdio.h>
int main()
{
    float a,b,c;
    int d;
    while(scanf("%f",&a)==1){
        if(a<=400.00){
            d=15;
            b=a*15.00/100.00;
        }
        else if(a>400.00 && a<=800.00){
            d=12;
            b=a*12.00/100.00;
        }
        else if(a>800.00 && a<=1200.00){
            d=10;
            b=a*10.00/100.00;
        }
        else if(a>1200.00 && a<=2000.00){
            d=7;
            b=a*7.00/100.00;
        }
        else{
            d=4;
            b=a*4.00/100.00;
    }
    c=a+b;
    printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: %d %c\n",c,b,d,'%');
    }
    return 0;
}




0 comments:

Post a Comment