Question: Write a program in cthat lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follow: 1

Write a program in cthat lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follow:
1. When the program begins, a random number in the range of 0 through 2 is generated. If the number is 0, then the computer has chosen rock.
If the number is 1, then the computer has chosen paper. If the number is 2, then the computer has chosen scissors.(Don't display the computer's
choice yet.)
2. To make his or her selection, the user can select from a menu that displays all options.
3. The computer's choice is displayed.
4. A winner is selected according to the following rules:
a. If one player chooses rock and the other chooses scissors, then the rock wins. (The rocks smashes the scissors.)
b. If one player chooses scissors and the other player chooses paper, the scissors wins. (Scissors cuts paper.)
c. If one player chooses paper and the other chooses rock, then paper wins. (Paper wraps rock.)
d. If both players make the same choice, the game is a tie.
Keep score for several rounds until the user decides to quit. Display a game report before exiting.
The game report will show a list of all the games played with their results and the final score with an appropriate parting message.
Make sure that the game is written using multiple functions.

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 Programming Questions!