Two different motor driver modules define a function named init().Without namespaces, these functions conflict.
init()
Your task is to organize them into two namespaces and call the correct one based on input.
Create two namespaces:
DriverA containing:
void init()
"A INIT"
DriverB containing:
"B INIT"
In main():
main()
x
x == 1
DriverA::init()
x == 2
DriverB::init()
Example 1
Input:
1
Output:
A INIT
Example 2
2
B INIT
Constraints:
Test Cases
Test Results
Input
Expected Output