Design a program that calculates and display the number of miles per hour over t
ID: 3626460 • Letter: D
Question
Design a program that calculates and display the number of miles per hour over the speed limit that a speeding was doing. The program should ask for the speed limit and the driver's speed. Validate the input as follows:
The speed limit should be at least 20, but not greater than 70.
The driver's should be at least the value entered for the speed limit (otherwise the driver was not speeding).
One correct data has been entered, the program should calculate and display the number of miles per hour over the speed limit that driver was doing.
Explanation / Answer
START SpeedViolation OUTPUT "Please enter the speed limit" INPUT limit IF (limit < 20) OR (limit > 70) THEN OUTPUT "Invalid Speed Limit" ENDIF OUTPUT "Please enter the driver speed" INPUT speed IF (speedRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.