Interactive user input is blue below.
C:\5ja\hw5>java GuessNumber 1. Easy (1-5) 2. Medium (1-20) 3. Difficult (1-1000) Enter 1, 2 or 3: 1 Guess what number I picked. 3 No - too high. Try again. 2 Yes - 2 is the number! C:\5ja\hw5>java GuessNumber 1. Easy (1-5) 2. Medium (1-20) 3. Difficult (1-1000) Enter 1, 2 or 3: 2 Guess what number I picked. 10 No - too low. Try again. 15 No - too low. Try again. 17 No - too low. Try again. 18 No - too low. Try again. 19 Yes - 19 is the number! C:\5ja\hw5>java GuessNumber 1. Easy (1-5) 2. Medium (1-20) 3. Difficult (1-1000) Enter 1, 2 or 3: 0 Enter 1, 2 or 3: two Enter 1, 2 or 3: 1 Guess what number I picked. 7 No - too high. Try again. -12 No - too low. Try again. zero zero is not a valid guess. 3 No - too low. Try again. 4 No - too low. Try again. 5 Yes - 5 is the number!