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 hereYou will be given a float variable called priceBeforeTax, representing your restaurant 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!