Develop an algorithm, using either pseudo-code or a flowchart, that helps a boat rental business on a lake calculate how many boat rentals they are likely to make on a particular day.
Your algorithm should:
- get the user to enter whether it is the weekend or a weekday
- get the user to enter the wind speed forecast in km/h (they should enter a number between 5 and 50 inclusive; if the number falls outside of this range then they should be made to re-enter another number until they enter a valid wind speed)
- calculate the base number of boat rentals likely to be made using the following rules:
- 40 rentals are likely if the wind speed is between 5 and 15 km/h inclusive,
- 80 rentals are likely if the wind speed is between 16 and 30 km/h inclusive,
- and 30 rentals are likely if the wind speed is higher than 30 km/h
- increase the estimated rentals by 50% (multiply by 1.5) if it is a weekend
- output the final estimated number of boat rentals.