0

Hello;

read this quastion , what do the last part mean ?
do they mean to print the remine cookies that have to be produced to let the number be complated !

or to print the number of cookies that we throw !

--------------------------------------
the quastion is :

A box of cookIes can hold a specific number of cookIes and a container can hold a specific number of boxes of cookIes.

Write a program that prompts the user to enter the total number of cookIes, the number of cookIes in a box, and the number of cookIes boxes in a container.

The program then outputs the number of boxes and number of containers to ship the cookIes.

Note that each box must contain a specific number of cookIes and each container must hold the specific number of boxes.

If the last box of cookIes contains less than the number of specified cookIes, you can discard it and output the number of left over cookIes. Similarly, if the last container contains less than the number of specified boxes, you can discard it and output the number of left over boxes.

Edited by Zay: n/a

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Zay
0

If each container holds 5 boxes and each box holds 20 cookies, each container holds 5 times 20 equals 100 cookies. If you get an order for 550 cookies, that's 5 containers, which holds 500 cookies. You have 50 cookies left over that don't fill a container. That's 2 boxes of 20, plus ten left over in a partial box. So given the input of 5 boxes per container, 20 cookies per box, and 550 cookies total, I imagine your output should be something like this:

5 full containers.
2 full boxes left over and discarded.
10 loose cookies left over and discarded[B].[/B]

That's my read of the problem.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.