Write a console program that picks a random number. The program lets the user guess which number it picked. If the user guessed incorrectly, the program tells the user whether their guessed number is too small or too big.
The program continues until the user guesses the right number.
For example (user input in green):
Please enter a number between 0 and 10 4 Your guessed number is too small Please enter a number between 0 and 10 6 Your guessed number is too big Please enter a number between 0 and 10 5 Congratulations, the number is indeed 5
Random random = new Random(); int lowerInclusive = 0; int upperInclusive = 10; int randomInt = random.nextInt(lowerInclusive, upperInclusive + 1);