Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- float s,perc,t;
- cin>>s;
- cout.precision(2);
- if(s >= 0 && s <= 400.00)
- {
- perc = s*0.15;
- cout<<"Novo salario: "<<fixed<<s+perc<<endl;
- cout<<"Reajuste ganho: "<<fixed<<perc<<endl;
- cout<<"Em percentual: 15 %"<<endl;
- }
- else if(s >= 400.01 && s <= 800.00)
- {
- perc = s*0.12;
- cout<<"Novo salario: "<<fixed<<s+perc<<endl;
- cout<<"Reajuste ganho: "<<fixed<<perc<<endl;
- cout<<"Em percentual: 12 %"<<endl;
- }
- else if(s >= 800.01 && s <= 1200.00)
- {
- perc = s*0.10;
- cout<<"Novo salario: "<<fixed<<s+perc<<endl;
- cout<<"Reajuste ganho: "<<fixed<<perc<<endl;
- cout<<"Em percentual: 10 %"<<endl;
- }
- else if(s >= 1200.01 && s <= 2000.00)
- {
- perc = s*0.07;
- cout<<"Novo salario: "<<fixed<<s+perc<<endl;
- cout<<"Reajuste ganho: "<<fixed<<perc<<endl;
- cout<<"Em percentual: 7 %"<<endl;
- }
- else if(s >= 2000.01 )
- {
- perc = s*0.04;
- cout<<"Novo salario: "<<fixed<<s+perc<<endl;
- cout<<"Reajuste ganho: "<<fixed<<perc<<endl;
- cout<<"Em percentual: 4 %"<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment