Answered step by step
Verified Expert Solution
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
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