Your task is to declare a scoped enum class named Mode with four values:
Also, implement a function named toString(Mode m) that returns "INPUT", "OUTPUT", "PULLUP", or "PULLDOWN" string.
The program will read an integer (0..3), map it to the enum, and print the corresponding mode.
Example Input:
0
Output:
INPUT
Input:
2
PULLUP
Test Cases
Test Results
Input
Expected Output