Write the program that lets the user play the game of rock , paper , and scissors against the computer?

The program should work as follows:
1.when the program begins, a random number in the range of 1 through 3 is generated . if the number is 1, then the computer has chosen rock . if the number is 2, then the computer has chosen paper . if the number is 3, then the computer has chosen scissors .(dont display the computers choice yet ). .

-The user enters his or her choice of "rock", "paper", or "scissors" or quit the program at the keyboard .((You can use a menu if you prefer. 1 for "rock ",2 for "paper",3 for "scissors",4 for "quit" .)

-- The computer's choice is displayed.
- A winner is selected according to the following rules:

If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.)

If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)

If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.)

If both players make the same choice, the game must be played again to determine the winner.

  • The program shall continue asking the user for a choise unitil the user enters 4 to Quit the game .

  • the program should be divided into 4 main methods that perform each major task in addition to the main method.
    1- computerChoice method .
    2- userChoice method .
    3- determineWinner method.
    4- displayChoice method.

^Please help me ........
programming languag c++
C plus plus

Create a menu and use simple if else.And then you are eligible to post your doubt with your code(whatever you've done).

This article has been dead for over six months. Start a new discussion instead.