Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int x;
- float y,sum=0;
- cin>>x>>y;
- if(x==1)
- sum = 4.00 * y;
- if(x==2)
- sum = 4.50 * y;
- if(x==3)
- sum = 5.00 * y;
- if(x==4)
- sum = 2.00 * y;
- if(x==5)
- sum = 1.50 * y;
- cout.precision(2);
- cout<<"Total: R$ "<<fixed<<sum<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement