Answered step by step
Verified Expert Solution
Link Copied!

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 hereimage text in transcribed 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

How can a company control and manage conflicts of interest?

Answered: 1 week ago

Question

Explain the relationship of job design to employee contributions.

Answered: 1 week ago