Challenge
No
Cthulhu runs Best Bento Boxes, supplying bento boxes to goat parties, meetings, whatevs. Write a program to work out a price for an event.
There are three sizes:
- Great Goat Gobble Box: $32.95 each
- Medium Mandy's Munch Box: $26.95 each
- Sue's Small Snack Pack: $17.95
There's a delivery fee:
- 10 or fewer boxes: $39.95
- 11 to 20 boxes: $59.95
- More than 20 boxes: Free delivery
Here's some I/O. Assume users make no mistakes.
- Best Bento Boxes
- ==== ===== =====
- How many of each type do you need?
- Great Goat Gobble Box: 1
- Medium Mandy's Munch Box: 1
- Sue's Small Snack Pack: 1
- Boxes: $ 77.85
- Delivery: $ 39.95
- Total price: $ 117.8
More:
- Best Bento Boxes
- ==== ===== =====
- How many of each type do you need?
- Great Goat Gobble Box: 10
- Medium Mandy's Munch Box: 10
- Sue's Small Snack Pack: 10
- Boxes: $ 778.5
- Delivery: $ 0
- Total price: $ 778.5
Round the total to two decimal places. (Leaving off cents if it's zero is OK.)
Upload a zip of your project folder. The usual coding standards apply.
If you were logged in as a student, you could submit a solution to this exercise.
Where referenced