Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You will be given a float variable called priceBeforeTax , representing your restaurant food bill. Compute the integer amount to pay such that the tip
You will be given a float variable called priceBeforeTax, representing your restaurant food bill.
Compute the integer amount to pay such that the tip is at least 15% and the total price paid (the price after tax plus the tip) is an exact dollar amount (no change used - other than possibly loonies and toonies!). Sales tax here is 15%.
Examples Sample 1596 Price after Sample Output Input tip tax (Amount paid) 1.00 10.00 100.00 0.15 1.15 1.50 11.50 15.00 115.00 2 13 130Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started