fork download
  1. #include<iostream>
  2. #include<cstdio>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double salin,salout,money,percent,val,multi;
  8.  
  9. scanf("%lf",&salin);
  10.  
  11. if(salin>=0 || salin<=400)
  12. val=0.15;
  13. if(salin>=400.01 || salin<=800.00)
  14. val=0.12;
  15. if(salin>=800.01 || salin<=1200.00)
  16. val=0.1;
  17. if(salin>=1200.01 || salin<=2000.00)
  18. val=0.07;
  19. if(salin>=2000.00)
  20. val=0.04;
  21.  
  22. money=salin*val;
  23. salout=salin+money;
  24. percent=val*100;
  25.  
  26. printf("Novo salario: %.2lf\n",salout);
  27. printf("Reajuste ganho: %.2lf\n",money);
  28. printf("Em percentual: %.lf %%\r\n",percent);
  29.  
  30.  
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 3472KB
stdin
800.01
stdout
Novo salario: 856.01
Reajuste ganho: 56.00
Em percentual: 7 %