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.



Answer :

Final answer:

Provides an algorithm to calculate parking charges based on hours parked and car type.


Explanation:

Algorithm:

  1. Take as input the number of hours the user has parked and whether their car is electric or not.
  2. Calculate the total price based on the parking duration and car type.
  3. Repeat the process until the user enters 0 hours.

Learn more about Parking charges algorithm here:

https://brainly.com/question/33323210