Keep a count of the number of times the player won lost and


Rock, Paper, Scissors (Please make sure it compiles and include output in answer.)

You will implement a rock-paper-scissors game.

The player enters 1 for Rock, 2 for Paper, or 3 for Scissors.

The computer randomly selects one of the three itself.

The program displays computer and player choices and who won (or if it is a tie).

Ask the player if they would like to play again.

Implement the following features in addition to the game play:

Keep a count of the number of times the player won, lost, and tied. Display these counts when the player ends the game.

Keep a count of the number of times the player selects rock, selects scissors, and selects paper. When the player stops playing display these counts.

Use the rand() function to generate the computers selection:

I.E.

/* initialize random seed. Do this only once at the beginning of the main-function */ srand ( time(NULL) ); int randomNumber; // this variable will hold the random number /* generate secret number: between 1 and 10. Change the 10 to a different value to */ generate random numbers up to that value */ randomNumber = rand() % 10 + 1;
When the player ends the game, display who won the most rounds. Also display the object the game winner won with the most.

Tell the player what they should have chosen to win most of the time. For example, if the computer chose rock 7 out of the 10 times then the player should have chosen paper to win most of the time.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Keep a count of the number of times the player won lost and
Reference No:- TGS02919089

Expected delivery within 24 Hours