Write an algorithm to:
1. Take as input the number of hours the user has parked and whether their car is electric or not.
2. Calculate and output the total price.
3. Repeat continually until the user enters 0 hours.
Note: The hotel car park charges £4 per hour. If the car is electric, this price is halved to £2 per hour.
You must use either:
- OCR Exam Reference Language, or
- A high-level programming language that you have studied.