CJCoding With Joseph

Traffic Light Action

Read a single character representing a traffic light color: R, Y, or G. Print the action a driver should take:

- R -> Stop
- Y -> Slow down
- G -> Go

For example, given the input R, the program prints:

Stop

Expected Output:

Stop
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
R
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.