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

Recommended Answers

All 6 Replies

Please help me ........

With what? All you did was post a homework assignment verbatim.

whith jcreator program

i whant full prodram

i whant full prodram

No. Please read our rules.

i will give you a full code for $400. Deal?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.