Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- import java.util.Scanner;
- /**
- *
- */
- public class Rockpaperscissors<computerGuess> {
- public static void main(String[] args) {
- Scanner cin = new Scanner(System.in);
- String input = cin.nextLine();
- int value = Integer.parseInt(input);
- Random Random = new Random();
- int computerGuess = (Random.nextInt(3) + 1);
- if (computerGuess == 1) {
- System.out.println("ROCK");
- } else if (computerGuess == 2) ;
- {
- System.out.println("PAPER");
- } else if (computerGuess == 3) ;
- { System.out.println("SCISSORS");
- }
- //end main
- //end class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement