C++ switch cases

Sure, here is an example of a C++ switch statement:

#include <iostream>
using namespace std;

int main() {
    int num = 2;

    switch (num) {
        case 1:
            cout << "One" << endl;
            break;
        case 2:
            cout << "Two" << endl;
            break;
        case 3:
            cout << "Three" << endl;
            break;
        default:
            cout << "Number not found" << endl;
    }

    return 0;
}

Explanation: 1. Include the necessary header files for input and output. 2. Define the main function. 3. Declare an integer variable num and assign it the value 2. 4. Use the switch statement with num as the expression to be evaluated. 5. Define case 1: if num is 1, output "One" and break out of the switch statement. 6. Define case 2: if num is 2, output "Two" and break out of the switch statement. 7. Define case 3: if num is 3, output "Three" and break out of the switch statement. 8. If none of the above cases match, execute the default case and output "Number not found". 9. End the switch statement. 10. Return 0 to indicate successful program execution.