Prime b

Prime b

  • NA
  • 810
  • 344.9k

Rock Paper Scisosrs

Jan 2 2012 6:24 PM
This is the problem

In the game Rock Paper Scissors, two players simultaneously
choose one of three options: rock, paper, or scissors.
If both players choose the same option, then the result
is a tie. However, if they choose diff erently, the winner is
determined as follows:
Rock b • eats scissors, because a rock can break a pair of
scissors.
• Scissors beats paper, because scissors can cut paper.
• Paper beats rock, because a piece of paper can cover a
rock.
Create a console-based game in which the computer randomly
chooses rock, paper, or scissors. Let the user enter
a character, 'r', 'p', or 's', each representing one of the three
choices. Th en, determine the winner

My question is: How can I make computer choose rock, paper or scissors?

Answers (1)