moranguinho

ex9ED2

Mar 29th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. int main (void)
  3. {
  4. float sal_base, gratif, sal_brut, imposto, sal_liq;
  5.  
  6. printf("Informe o salario base: R$");
  7. scanf("%f", &sal_base);
  8. printf("Informe a gratificacao: ex: 5 para 5%%");
  9. scanf("%f", &gratif);
  10.  
  11. sal_brut = sal_base + gratif/100 * sal_base;
  12.  
  13. if(sal_brut<1000){
  14. imposto = sal_brut * (15/100);
  15. }
  16. else{
  17. imposto = sal_brut * (20/100);
  18. }
  19. sal_liq = sal_brut - imposto;
  20.  
  21. printf("Salario liquido de R$%.2f", sal_liq);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment