RockPaperScissors JAVA

Create a java programme called rockPaperScissors.java
● Write a program that allows the user to play rock, paper, scissors.
● The program should randomly generate a number (0, 1 or 2), which
represents scissors, rock and paper, respectively. (Hint: look up
Math.random)
● The program should then prompt the user to enter a number (0, 1 or 2).
● Once the user has entered their number, the program should inform
them whether they win, lose or draw.
● The rules of the game are as follows:
○ Scissors beats paper
○ Rock beats scissors
○ Paper beats rock

×
New Download