Question: Consider the following computer programming problem: We wish to write a program that helps a restaurant patron calculate a tip for a meal. A food/drink
Consider the following computer programming problem: We wish to write a program that helps a restaurant patron calculate a tip for a meal. A food/drink subtotal is entered, then a 6.25% tax is computed. Tax, as well as several tips (based on the food/drink subtotal only) are displayed - a tip of 5% (poor service), 10% (below average service), 15% (average service), 20% (better than average service) and 25% (superior service) along with total owed. There is also a header and footer. After a run, the program stops. Notes: * Use a constant for the tax rate. * You must use a loop. Type is up to you. * You must show currency formatting - dollar sign, dollars and cents for all money amounts. * Show tip percentages as integer percentages when displaying them. * First prompt shows just a $ at the end of the string, the user types in dollars and cents. * Headers and footers are new for this program, remember, they are "steps" when writing IPO. * There is only 1 input - subtotal. The service types that are listed above after precentages are just for your information. 2. Write up an IPO chart for this problem. 3. Desk-check your solution. Here's both some test data and a sample run so you can see what the prompts and output needs to look like. Match it. Use your calculator to check other inputs and outputs. Hammer's Restaurant Please enter your food and drink subtotal: $74.60 Your tax is $4.66 and.. .. a 5% tip is $3.73 giving a total of $82.99 .. a 10% tip is $7.46 giving a total of $86.72 .. a 15% tip is $11.19 giving a total of $90.45 .. a 20% tip is $14.92 giving a total of $94.18 .. a 25% tip is $18.65 giving a total of $97.91 Thanks for eating with us! Come back soon!
this is how you write the IPO Process Title Input Variables.. Processing Variables.. Output Variables.. Algorithm.. One under the other.
Now write, test, debug and complete the C++ code for this problem
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
