Question: C++ Part 2: Rock Paper Scis sors Game Write a program that lets the user play this game against the computer. The program should work

C++

Part 2: Rock Paper Scissors Game

Write a program that lets the user play this game against the computer. The program should work as follows:

  • When the program begins, a random number between 1 and 3 is generated.
    • If the number is 1, the computer has chosen rock.
    • If the number is 2, the computer has chosen paper.
    • If the number is 3, the computer has chosen scissors.
    • Don't display the computer's choice yet.
  • Use a menu to display the choices the user can enter.
  • Prompt the user to enter his or her choice of rock, paper or scissors.
  • Display the computer's choice and the users choice.
  • Select a winner according to the following rules:
    • Rock smashes scissors, so rock wins.
    • Scissors cuts paper, so scissors wins.
    • Paper wraps rock, so paper wins.
    • If both players make same choice, game must be played again to determine winner.

Divide program into functions to perform each major task. You should have at least 4 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 Databases Questions!