Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import java.util.Random;
  2. import java.util.Scanner;
  3.  
  4. /**
  5. *
  6. */
  7.  
  8.  
  9. public class Rockpaperscissors<computerGuess> {
  10. public static void main(String[] args) {
  11. Scanner cin = new Scanner(System.in);
  12. String input = cin.nextLine();
  13. int value = Integer.parseInt(input);
  14. Random Random = new Random();
  15. int computerGuess = (Random.nextInt(3) + 1);
  16.  
  17. if (computerGuess == 1) {
  18. System.out.println("ROCK");
  19. } else if (computerGuess == 2) ;
  20. {
  21. System.out.println("PAPER");
  22. } else if (computerGuess == 3) ;
  23. { System.out.println("SCISSORS");
  24.  
  25. }
  26. //end main
  27. //end class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement