The company sells the coffee in 2-lb bags only, and the price of a single 2-lb
bag is \$5.50. When a customer places an order, the company ships the
order in boxes. The boxes come in three sizes: the large box holds 20 bags
of 2 lb, the medium 10 bags, and the small 5 bags. The cost of a large
box is \$1.80; a medium box, \$1.00; and a small box, \$0.60. The order is
shipped in the least expensive manner. For example, the order of 52 bags
will be shipped in four boxes: two large, one medium, and one small. The
rule for packing is to fill the large and medium boxes completely; that is,
the box is fully packed. Only the small boxes can have empty spaces. For
example, to ship 52 bags, you could have used 3 large boxes, but that
would leave the third box not fully packed. Develop a program that
computes the total cost of an order.Display the output in the following
format:

Number of Bags Ordered: 52 - \$ 286.00
Boxes Used:
2 Large - \$3.60
1 Medium - \$1.00
1 Small - \$0.60
Your total cost is: \$ 291.20

What have you tried so far, other than asking us to do it for you?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.