URI - BEECROWD - BEE 1048 Solution in C,C++,Python | URI - BEECROWD - BEE 1048

URI - BEECROWD - BEE Online Judge Solution  1048-Salary Increase | URI - BEECROWD - BEE 1048 Solution in C,C++,Python

The company ABC decided to give a salary increase to its employees, according to the following table:

SalaryReadjustment Rate

0 - 400.00
400.01 - 800.00
800.01 - 1200.00
1200.01 - 2000.00
Above 2000.00


Read the employee's salary, calculate and print the new employee's salary, as well the money earned and the increase percentual obtained by the employee, with corresponding messages in Portuguese, as the below example.


The input contains only a floating-point number, with 2 digits after the decimal point.


Print 3 messages followed by the corresponding numbers (see example) informing the new salary, the among of money earned and the percentual obtained by the employee. Note:
Novo salario:  means "New Salary"
Reajuste ganho: means "Money earned"
Em percentual: means "In percentage"

Input SampleOutput Sample


Novo salario: 460.00
Reajuste ganho: 60.00
Em percentual: 15 %


Novo salario: 880.01
Reajuste ganho: 80.00
Em percentual: 10 %


Novo salario: 2140.00
Reajuste ganho: 140.00
Em percentual: 7 %

URI Online Judge Solution  1048-Salary Increase | URI 1048 Solution in C,C++,Python:


It's a simple problem.You just have to count the total salary,and the benefit he can make.Then you have to print those values according to the problem's statement.
N.B: Don't copy paste the code as same. Just try to understand it and try yourself. It would be better for you.

  URI Problem 1048 Solution in C :   

  URI Online Judge 1048 Solve  in C :                                                                             

int main()
    float s;


    if(s>0 && s<=400.0)
        printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 15 %%\n",(s+(s*.15)),(s*.15));
    else if(s<=800.0)
        printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 12 %%\n",(s+(s*.12)),(s*.12));
    else if(s<=1200.0)
        printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 10 %%\n",(s+(s*.10)),(s*.10));
    else if(s<=2000.0)
        printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 7 %%\n",(s+(s*.07)),(s*.07));
        printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 4 %%\n",(s+(s*.04)),(s*.04));
    return 0;

0 Response to URI - BEECROWD - BEE 1048 Solution in C,C++,Python | URI - BEECROWD - BEE 1048

Post a Comment