Question: Using C++ language : Please write a program using switch statements, with the following rules (see hint below the instructions). --------------------------------------------------------------------------------------- The only printf lines
Using C++ language :
Please write a program using switch statements, with the following rules (see hint below the instructions).
---------------------------------------------------------------------------------------
The only printf lines you can use are the following:
(you can only use each one once)
printf("Enter an integer (1-10) "); printf("A"); printf("B"); printf("C"); printf("D"); printf("E"); printf("F");
Ask the user to enter an integer.
Print A if the user enters 3 Print B if the user enters 1,2, or 3 Print C if the user enters 10 Print D if the user enters 5, 6, 7, or 10 Print E if the user enters 4 Don't print anything if the user enters 8 or 9 Print F if the user enters any other number not listed above.
Can follow this syntax format while you build the program





switch(expression) { case X: // code block break; case y: // code block break; default: // code block } #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
