Advertisement
Joao_Joao

Questão 41 Lista de Exercícios IFPB

May 11th, 2022
1,110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void main() {
  4.   int horas;
  5.   float valor_p_hora;
  6.   printf("Digite a quantidade de horas trabalhadas durante 1 mes: ");
  7.   scanf("%d", &horas);
  8.   printf("Digite o valor de cada hora trabalhada: ");
  9.   scanf("%f", &valor_p_hora);
  10.   const float HORAS_EXTRAS = horas - 160;
  11.   const float V_HORAS_EXTRAS = HORAS_EXTRAS * (valor_p_hora + valor_p_hora * 50 / 100);
  12.   float pagamento = 160 * valor_p_hora + V_HORAS_EXTRAS;
  13.   printf("O pagamento do funcionario sera: R$ %.2f\n", pagamento);
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement