Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 3:Restaurant You will open a restaurant that sells three items: Salad ($3.50 each), Pizza ($7.25 each), and Ice Cream ($5.50). Your restaurant will do

image text in transcribed

Exercise 3:Restaurant You will open a restaurant that sells three items: Salad ($3.50 each), Pizza ($7.25 each), and Ice Cream ($5.50). Your restaurant will do the following: 1. Ask the user if they want Salad then Pizza then Ice Cream . In all cases, you are prompting them for a yeso answer. For yes they can type 'y' or 'Y', and for no they can type 'n' or 'N' . If they want an item, find out how many . The user must not be allowed to order less than zero of an item, if they do, simply set the amount they order to zero. 2. Ask them for their age, this will affect the discount . Anyone 55 or older gets a 10% discount off the total cost AFTER tax . Anyone 8 or younger gets all the ice cream they want for FREE! (This is not taxed!) 3. Display a cost per item (before any discounts), a subtotal (before any discounts), a tax amount, a discount amount, and a grand total Tax is 25% (yikes!) Sample run: WELCOME TO THE RESTAURANT Do you want Salad? (y): y How many?: 10 Do you want Pizza? (y): N Do you want Ice cream? (y): Y How many?: 10 How old are you?: 4 10 Salads @ $3.50 ==> $35.00 Pizza @ $7.25 ==> $0.00 10 Ice Cream @ $5.50 ==> $55.00 Subtotal: $35.00 Tax: $8.75 Discount: $55.00 == Total: $43.75 Please come again! NOTE: For the rounding to two digits use this: int main() { std::cout.precision(2); std::cout

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 Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions