Question: *****THE CODE MUST BE IN JAVA ****** A box of cookies can hold 24 cookies and a container can hold 75 boxes of cookies. Write

*****THE CODE MUST BE IN JAVA ******

A box of cookies can hold 24 cookies and a container can hold 75 boxes of cookies. Write a program that prompts the user to enter the total number of cookies, then outputs the number of boxes and the number of containers to ship the cookies. If there are not enough cookies to fill a box, the box can be discarded and the number of leftover cookies should be output. If the number of boxes will not fill a container, then the leftover boxes can be discarded and the number of leftover boxes should be output.

For example: You need 1800 cookies (75 boxes each filled with 24 cookies) to fill a container. The user enters 2500 cookies - example output might be:

You entered 2500 cookies.

1 container with 75 boxes of 24 cookies shipped

29 boxes of 24 cookies discarded

4 cookies discarded

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!