# How do I make a rock, paper, scissors, program?

answered Nov 16 by (140 points)
you can use the rand function with time so that every second it generates a random number and then use if else or switch case to determine when it should be rock paper and scissors make sure that the probability of getting any of them is equal for example you can use if the number is divisible by 3 to stone not divisible by 3 to paper divisible by 5 for scissors.
answered Nov 16 by (63,320 points)

First, you get the logic right:

• There are two players (either two human, or one human, one machine -- or even two machine)
• Both make a random pick of three possible choices: rock, paper, scissors. You can also think of these as numbers: 0, 1, 2
• When the choices are made, comparisons are done:
• If both picked the same, it's a tie
• rock beats scissors
• paper beats rock
• scissors beat paper
• Based on the comparison, a winner is selected

Then you chose a programming language and start implementing the logic. Use input and output functions and conditions to branch your code in the right path.

Here's some pseudo-code for you:

```Choices: { rock, paper, scissors }
print("Rock/Paper/Scissor?")