URI Online Judge | 1048
Aumento de Salário
Por Neilor Tonin, URI
Brasil
Timelimit: 1
A empresa ABC resolveu conceder um aumento de salários a seus funcionários de acordo com a tabela abaixo:

Leia o salário do funcionário e calcule e mostre o novo salário, bem como o valor de reajuste ganho e o índice reajustado, em percentual.
Entrada
A entrada contém apenas um valor de ponto flutuante, com duas casas decimais.
Saída
Imprima 3 linhas na saída: o novo salário, o valor ganho de reajuste e o percentual de reajuste ganho, conforme exemplo abaixo.
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.
URI Online Judge | 1048
Salary Increase
By Neilor Tonin, URI
Brazil
Timelimit: 1
The company ABC decided to give a salary increase to its employees, according to the following table:
Salary | Readjustment Rate |
0 - 400.00 400.01 - 800.00 800.01 - 1200.00 1200.01 - 2000.00 Above 2000.00 | 15% 12% 10% 7% 4% |
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.
Input
The input contains only a floating-point number, with 2 digits after the decimal point.
Output
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"
Novo salario: means "New Salary"
Reajuste ganho: means "Money earned"
Em percentual: means "In percentage"
#include<stdio.h>
int main(){
float salario;
scanf("%f", &salario);
if (salario <= 400.0)
printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 15 %%\n", salario * 1.15, salario * 1.15 - salario);
else if (salario <= 800.0)
printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 12 %%\n", salario * 1.12, salario * 1.12 - salario);
else if (salario <= 1200.0)
printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 10 %%\n", salario * 1.10, salario * 1.10 - salario);
else if (salario <= 2000.0)
printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 7 %%\n", salario * 1.07, salario * 1.07 - salario);
else
printf("Novo salario: %.2f\nReajuste ganho: %.2f\nEm percentual: 4 %%\n", salario * 1.04, salario * 1.04 - salario);
return 0;
}
Nenhum comentário:
Postar um comentário