Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Assume you opened a collec shop on the beach (which is a great investment idea) and you sell collec in three sizes: small (9oz),

image text in transcribed

image text in transcribed

Description Assume you opened a collec shop on the beach (which is a great investment idea) and you sell collec in three sizes: small (9oz), medium (12oz), and large (15oz). The cost of one small cup is $1.75, one medium cup is The steps your program will take are 1. Prompt the user to enter s' for small, 'mi or medium, and 'l' for large (case insensitive) 2. If the user enters anything other than 's 'm', or l', output the error and go back to stepO 3. Prompt the user for the amount of cups 4. If the user enters an invalid number (say a string) or a negative number, output the error and go to step you may need uo use cin.clear C) and cin.ignore(100, but if the user entered a negative number, then there is no actual input failure so you would go to step Without reseting the input stream 5. You will output the small cups solds, medium cups sold, large cups sold, amount of collec in ounces sold, and total profit at this point in the execution of the program nicely formatted, decimals need to be fo to two decimaal places 6. Ask the user if they wish to continue or quit, if the user enters 'q' (case insensitive) then you escape from the loop, if the user enters any other character go uo suepD

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

More Books

Students also viewed these Databases questions

Question

What role does personal selling play in an IMC campaign?

Answered: 1 week ago

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago

Question

a. What is productivity in this economy?

Answered: 1 week ago