The Jumpin’ Jive coffee shop charges $2 for a cup of coffee and offers the add-ins shown in the table below. Product Prices Whipped Cream 0.89 Cinnamon 0.25 Chocolate Sauce 0.59 Amaretto 1.50 Irish Whiskey 1.75 Design the logic for an application that allows a user to enter ordered add-ins continuously until a sentinel value is entered. After each item, display its price or the message Sorry, we do not carry that as output. After all items have been entered, display the total price for the order. Use parallel arrays, one for the name of the product, and one for the price. Sum in a single variable the prices to get the total price
The Jumpin’ Jive coffee shop charges $2 for a cup of coffee and offers the add-ins shown in the table below.
Product Prices
Whipped Cream 0.89
Cinnamon 0.25
Chocolate Sauce 0.59
Amaretto 1.50
Irish Whiskey 1.75
Design the logic for an application that allows a user to enter ordered add-ins continuously until a sentinel value is entered. After each item, display its price or the message Sorry, we do not carry that as output. After all items have been entered, display the total price for the order.
Use parallel arrays, one for the name of the product, and one for the price. Sum in a single variable the prices to get the total price
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images