algorithm creation
Divide number of bags by 36 and round down = number of large containers
Divide remainder by 6 and round up if not exact = number of small containers
Sounds like a homework assignment.
Tim.
"Gixxer_J_97" wrote in message
...
i have 2 size shipping containers that are available
the large can hold up to 36 bags of product and the small up to 6 bags
how would i go about creating an algorithm that would calculate how many
(the least number) small and large boxes i would need to use?
I've gotten this far:
Bags Small Large
1-6 1 0
7-12 2 0
13-18 3 0
19-24 0 1
25-30 0 1
31-36 0 1
37-42 1 1
43-48 2 1
49-54 3 1
55-60 0 2
61-66 0 2
67-72 0 2
73-78 1 2
79-84 2 2
85-90 3 2
91-96 0 3
97-102 0 3
103-108 0 3
109-114 1 3
115-120 2 3
121-126 3 3
127-132 0 4
133-138 0 4
139-144 0 4
etc etc
and now i'm a bit stuck - any help is greatly appreciated
thanks!
|