Rock Paper Scissors Game Instructions In the game Rock Paper Scissors, two players simultaneously choose one of three options: rock, paper, or scissors. If both chose the same option, then the result is a tie. However, if they choose differently, the winner is determined as follows: • Rock beats scissors, because a rock can break a pair of scissors. • Scissors beat paper, because scissors can cut the paper. • Paper beats rock, because a piece of paper can cover a rock. Create a game in which the computer randomly chooses rock, paper, or scissors. Assign the number 1, 2, or 3 to represent one of the three choices. Let the user enter a number. Then determine the winner by comparing the user input and the randomly generated choice of the computer. Additional instructions: • The Program should validate all user input. • Game should ask the user to play again and continue if yes and stop if no. • Once the user stops playing, program should print the total number of wins.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 27PE
icon
Related questions
Question

Rock Paper Scissors Game Instructions

In the game Rock Paper Scissors, two players simultaneously choose one of three options: rock, paper, or scissors. If both chose the same option, then the result is a tie. However, if they choose differently, the winner is determined as follows:

• Rock beats scissors, because a rock can break a pair of scissors.

• Scissors beat paper, because scissors can cut the paper.

• Paper beats rock, because a piece of paper can cover a rock.

Create a game in which the computer randomly chooses rock, paper, or scissors. Assign the number 1, 2, or 3 to represent one of the three choices. Let the user enter a number. Then determine the winner by comparing the user input and the randomly generated choice of the computer.

Additional instructions:

• The Program should validate all user input.

• Game should ask the user to play again and continue if yes and stop if no.

• Once the user stops playing, program should print the total number of wins.

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I would need it done in Java Language 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT