Question: Using this pseudocode, what is the code in C++ for this problem? // Start // Declarations // num SIZE = 5 // num COFFEEPRICE =

 Using this pseudocode, what is the code in C++ for this

Using this pseudocode, what is the code in C++ for this problem?

// Start

// Declarations

// num SIZE = 5

// num COFFEEPRICE = 2.00

// string products[SIZE]="Whipped cream", "Cinnamon", "Chocolate sauce", "Amaretto", ""Irish whiskey"

// num prices[SIZE]=0.89, 0.25, 0.59, 1.50, 1.75

// num totalPrice = 0

// num choice = 0

// num SENTINEL = -1

//

// while (choice SENTINEL))

// output "Please select an item from the Product menu by selecting the item number (1 - 5) or -1 to terminate: "

// output "Product Price ($)"

// output "======= ========="

// output "1. Whipped cream 0.89"

// output "2. Cinnamon 0.25"

// output "3. Chocolate sauce 0.89"

// output "4. Amaretto 1.50"

// output "5. Irish whiskey 1.75"

// output "Please enter a positive number: "

// input choice

// if (choice -1) then

// if ((choice >= 1) and (choice

// totalPrice = totalPrice + prices[choice-1]

// output "Item number ", choice,": ", products[choice-1], " has been added"

// else

// output "Item number ",choice, " is not valid", "Sorry we do not carry that item"

// endif

// endif

// endwhile

// totalPrice = totalPrice + COFFEEPRICE

// output "Total price of order is ",totalPrice

// output "Thanks for purchasing from Jumpin Jive Coffee Shop"

// Stop

7. The Jumpin' Jive coffee shop Product Price ($) charges $2 for a cup of coffee 0.89 and offers the add-ins shown in Whipped cream Table 6-2. Cinnamon 0.25 Design the logic for an Chocolate sauce 0.59 application that allows a user Amaretto 1.50 to enter ordered add-ins continuously until a sentinel Irish whiskey 1.75 value is entered. After each item, display its price or the Table 6-2 Add-in list for Jumpin' Jive coffee shop message Sorry, we do not carry that as output. After all items have been entered, display the total price for the order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!