Question: Write a program based on the state diagram below. The program reads RPM & Speed and decides the next state. Use a loop to continuously

Write a program based on the state diagram below. The program reads RPM & Speed and decides the next state. Use a loop to continuously ask for inputs until the user quits. Display the RPM, speed, Current State, and Next State. State 1 RPM-500 Speed 0 Start state State 1 RPM-input Speed input RPM >= 2000 and peed (increasing) RPM = 1500 and speed (decreasing) State = 2 RPM-input Speed input State 3 RPM input Speed input RPM2000 and speed t (increasing)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
