Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ Write a program that computes the tax and tip on a restaurant bill for a patron based on what they ordered. Below are

IN C++image text in transcribedimage text in transcribedimage text in transcribed

Write a program that computes the tax and tip on a restaurant bill for a patron based on what they ordered. Below are some suggested steps to help you build the program. Create an array that can store 10 elements (i.e. the prices of the items) Create a loop that allows the array to be filled with a price each time the user inputs a new value The loop will iterate as long as the user has items to add The output will show the price of the current entered items and their subtotal as well as the tax Once the user has no more items to enter (they will input "no) 4 tip options will be displayed for them to choose from The user will input a tip amount and their total amount will be calculated. See below for sample outputs use a string for the input *Your program will be tested against different inputs. ** Suggestion: Complete each part one at a time to ensure at least some credit. Use at least one constant variable* (1) Ask the user for the price of the first item that they ordered and compute the subtotal and tax on that item. (Submit for 5 point) What was the price of the item you ordered? Item 1 $10.99 Current subtotal: $10.99 Current tax: $0.741825 Do you have any other items? no (2) Compute the tax owed on the meal and the new subtotal including tax. North Carolina's food tax is a rate of 6.75% (Submit for 5 points) What was the price of the item you ordered? Item 1: $12.5 Current subtotal: $12.5 Current tax: $0.84375 Do vou haveany other items? ves What was the price of the item you ordered? Item 1: $12.5 Item 2: $0.99 Current subtotal: $13.49 Current tax: $0.910575 Do you have any other items? no

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

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago