|
OP - please read the forum Rules and Posting Guidelines regarding thread titles and use of code tags.
I would point out that the question is not very sensible - I have never seen a container that measures 100ft x 1 ft x 1ft (100 cu feet).
Surely none of the chocolate box dimensions should exceed the corresponding container dimensions.
A tip - it is recommended that (as devnull69 shows you) the opening brace { is placed on the same line as the function, if, else, do, while, or for statement and not on the following line. This is because of something known as automatic semi-colon insertion. If you disregard this advice it is looking out and one day it will rise up and bite you in the undercarriage, and create an error which can be hard to find.
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Last edited by Philip M; 12-04-2012 at 07:39 AM..
|