Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a program that calculates the number of Shot, Regular, Grande and Venti cups needed to fill a customers order using the fewest number

1. Write a program that calculates the number of Shot, Regular, Grande and Venti cups needed to fill a customers order using the fewest number of cups and with the least amount of wasted cup space.
2. Your program should first prompt the user for the number of ounces of coffee they wish to order and then prompt them for their name. Your program must be able to properly handle names containing white space.
3. Your program should display the customers name along with the number of Venti, Grande, Regular and Shot cups needed.
The language is dev c ++
Bonus Pts (5pts). After completing all instructions above, add code to randomly generate the amount of coffee ordered. That number should be an integer no greater than 128. Use the randomly generated number for the amount rather than the one received from the user (overwrite the value stored in your amount variable with the random number). Each time the program is run, a different random number should be generated. You must follow all these instructions to receive full credit.

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions