Question: 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 130
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
