Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- double sal, reaj;
- int por;
- scanf("%lf", &sal);
- char ch = '%';
- if(sal<=400.00){
- reaj = sal*0.15;
- sal = sal+reaj;
- por = 15;
- }
- else if(sal<=800.00){
- reaj = sal*0.12;
- sal = sal+reaj;
- por = 12;
- }
- else if(sal<=1200.00){
- reaj = sal*0.10;
- sal = sal+reaj;
- por = 10;
- }
- else if(sal<=2000.00){
- reaj = sal*0.07;
- sal = sal+reaj;
- por = 7;
- }
- else{
- reaj = sal*0.04;
- sal = sal+reaj;
- por = 4;
- }
- printf("Novo salario: %.2lf\nReajuste ganho: %.2lf\nEm percentual: %d %c\n", sal, reaj, por, ch);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment