Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.out.println("Would you like to play a guessing game?");
- response2 = myScanner.nextLine();
- if (response2.equalsIgnoreCase("Yes") || (response2.equalsIgnoreCase("Sure")) || (response2.equalsIgnoreCase("Yep")))
- {
- System.out.println("Im going to pick a number between 0 and 10 and you're going to try and pick it!nWhat number am I thinking of?");
- guess2 = myScanner.nextInt();
- if (guess2 == randomNum)
- {
- System.out.println("Wow! You guessed correctly!");
- }
- else
- {
- System.out.println("Nope! The number I was actually thinking about was "+randomNum+".");
- }
- }
- else
- {
- System.out.println("Oh, ok. I see how it is. I'll just go cry in the corner I guess.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement