C++ Traffic Signal Problem
Pseudais is a car company, recently they have developed an electric-powered car, the C.E.O of the company wants to add an auto-pilot feature to the car. He hires a software engineer to write a code for this, he explains to him that the car needs to detect the traffic signals and move and stop the car accordingly, he also says that the car should be programmed to take input from sensors and turn left or right.
Based on what you have learned in the previous lesson write a piece of code for the above problem.
Solution