Challenge
No
Write a program to work out the price for a boat rental. The user enters the number of people in the party, from 1 on up. Assume the user makes no typing or other mistakes.
The price depends on the number of people. For a party up to six people, you can use the small boat, for a cost of $180 per person for the day. For more than six people, you need the bigger boat. It costs $220 per person.
The output tells the user the total price, and which boat will be used. Here's some I/O:
- Crusty Cathy's Boat Rental
- ====== ======= ==== ======
- How many people? 10
- We'll need a bigger boat.
- Total price: 2200
More:
- Crusty Cathy's Boat Rental
- ====== ======= ==== ======
- How many people? 2
- The small boat will work fine.
- Total price: 360
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