switch(nextChoice) {
case 0:
cout << "Rock" << endl;
break;
case 1:
cout << "Paper" << endl;
break;
case 2:
cout << "Scissors" << endl;
break;
default:
cout << "Unknown" << endl;
}
This switch statement checks the value of the variable nextChoice. If the value is 0, it will print "Rock" and end the switch statement with the break statement. If the value is 1, it will print "Paper" and end the switch statement. If the value is 2, it will print "Scissors" and end the switch statement. For any other value, the default case will be executed, printing "Unknown" and end the switch statement.