Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help creat a simple C++ if-else statement for this problem. Statement and sample is attatched below. You will open a restaurant that sells three

please help creat a simple C++ if-else statement for this problem. Statement and sample is attatched below.
image text in transcribed
image text in transcribed
You will open a restaurant that sells three items: Salads, Pasta, and Cake. Your restaurant will do the following: 1. Ask the user if they want Salads then Drinks then Cakes . In all cases, you are prompting them for a yes no answer. For yes they can type V 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 65 or older gets a 10% discount off the total cost BEFORE tax Anyone 5 or younger gets all the cake they want for FREE! 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 5% Sample run: . lax is 5% Sample run: ========================== WELCOME TO THE RESTAURANT EEEEEE Do you want Salads? (y): y How many?: 10 Do you want Drinks? (y): N Do you want Cakes? (y): Y How many?: 10 How old are you?: 68 EEEEEEEEEEE ============= 10 Salads @ $4.25 ==> $42.50 Drinks @ $1.05 ==> $0.00 10 Cakes @ $3.55 ==> $35.50 Subtotal: $78.00 Tax: $3.90 . Discount: $7.80 =============== Total: $74.10 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

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions