Task 1
An emergency plumber charges £50 for the first half hour, and then £20 for each subsequent half hour (or part thereof). He has a minimum charge of £75 for any call out.
Write an algorithm to work out the and display the cost of a call out.
Task 2
A minibus company uses the following information to calculate the cost of a journey. A minibus can hold up to 16 passengers.
The cost is £4 for the first 3 miles, and after that it is £3 per mile. If there are under 10 passengers there is an extra charge of 30% added.
Write an algorithm to calculate the cost of the journey.
Your algorithm should
- allow number of passengers and distance of the journey to be input as whole numbers
- calculate and output the cost of the journey