If even the player won the game display appropriate message


You need help with the following progra

Write a C++ program to simulate the following game:

1. The player has two dice to roll.

2. The numbers that are rolled on the sum (Sum1) is checked to see if it is even or odd.

3. If Sum1 is even, then the player gets one more chance to roll the dice.

a. After the player rolls the dice, the sum is generated again. Let us call it Sum2.

b. Now Sum2 is added with Sum1 and the total is checked to see if it is even or odd.

i. If Even, the player won the game. Display appropriate message and display the total (Sum1+Sum2) as the Number of points earned.

ii. If Odd, the player lost the game. Display appropriate message. (Do not have to display points/total)

4. If Sum1 is odd, the player lost the game. Display appropriate message. (Do not have to display points/ total)

The player can repeat this game any number of times. Ask a player if he wants to play the game again. If yes, repeat, else stop.

(Hint: Can use 'y' or 'Y' to represent yes and 'n' or 'N' to represent No.)

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: If even the player won the game display appropriate message
Reference No:- TGS02869492

Expected delivery within 24 Hours