Question: Dice game C++ PROGRAMS: a. Write a program using loops that simulates two players playing a dice game for 11 turns. For each turn, you

Dice game C++ PROGRAMS: a. Write a program using loops that simulates two players playing a dice game for 11 turns. For each turn, you roll two dices and add up the numbers. When the total is even, player1 gets a point and when it is odd, player2 gets a point. You must keep track of how many points each player gets. At the end you need to determine and display which player won. Use random numbers to generate the dice roll for each turn. Don't forget to seed your random number generator.

Note: This part of your program does not require any user input.

b. Extend your program by using a loop around your game that asks the users whether they want to play again (y or n) and runs the whole game again if they enter y or Y and exits if they press anything else. At the end, you should display how many rounds of games each player won.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!