Question: a) A game is played in which a single dice is tossed. If the result is 4 or 6, the player wins. If the result

a) A game is played in which a single dice is tossed. If the result is 4 or 6, the player wins. If the result is 1 or 3, the player loses. If the result is 2 or 5, the player continues to roll the dice until a win or a loss occurs. A complete C++ function game() is given below, re-write the function with switch-case statement. [3 Marks] * void game (int roll) { if ((roll == 1) || (roll == 3)) cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
