Jeremiah_

1048_URI.c

Mar 18th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     double sal, reaj;
  7.     int por;
  8.     scanf("%lf", &sal);
  9.     char ch = '%';
  10.     if(sal<=400.00){
  11.         reaj = sal*0.15;
  12.         sal = sal+reaj;
  13.         por = 15;
  14.     }
  15.     else if(sal<=800.00){
  16.         reaj = sal*0.12;
  17.         sal = sal+reaj;
  18.         por = 12;
  19.     }
  20.     else if(sal<=1200.00){
  21.         reaj = sal*0.10;
  22.         sal = sal+reaj;
  23.         por = 10;
  24.     }
  25.     else if(sal<=2000.00){
  26.         reaj = sal*0.07;
  27.         sal = sal+reaj;
  28.         por = 7;
  29.     }
  30.     else{
  31.         reaj = sal*0.04;
  32.         sal = sal+reaj;
  33.         por = 4;
  34.     }
  35.     printf("Novo salario: %.2lf\nReajuste ganho: %.2lf\nEm percentual: %d %c\n", sal, reaj, por, ch);
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment