Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that gets the following information from the user: 1) The subtotal of the restaurant bill 2) The sales tax rate 3)

Write a C++ program that gets the following information from the user:
1) The subtotal of the restaurant bill
2) The sales tax rate
3) The desired tip rate
4) The number of people in the party
The program will then calculate the grand total and divide it by the number of
people to let each person know what they owe on the bill.
It will use the formula:
1 patrons payment = (subtotal + subtotal * tax rate + subtotal * tip rate) /
number of patrons
Equivalently, this can be written as:
1 patrons payment = (subtotal * (1 + tax rate + tip rate)) / number of patrons
Make sure to round up in the final answer to the nearest cent.

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions