Q1) Complete the following program c++ by writing a switch statement that displays “one” if the user has entered 1, "two” if the user has entered 2, and "three" if the user has entered 3. If a number other than 1, 2, or 3 is entered, the program should display an error message.
#include int main()int userNum;cout < "enter="" one="" of="" the="" numbers="" 1,="" 2,="" or="" 3:="">cin >> userNum;// Write the switch statement here.return 0;
int main()int userNum;
cout < "enter="" one="" of="" the="" numbers="" 1,="" 2,="" or="" 3:="">
cin >> userNum;
// Write the switch statement here.return 0;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here