Hi I\'m trying to use Math.random to generate a random number between 0 and 100, then ask a user to enter a number between 0 and 100, or -1 to quit. If the number is out of boun
For a start, your call to keyboard.nextInt() (and its corresponding println of "Guess a number between 0-100") should be within your while loop.
Then you should consider changing your while loop to
while (true) {
// read input from user
if (guess < value) { // tell user their guess is too low
} else if (guess > value) { // tell user their guess is too high
} else { // tell user congrats, and call break to exit the while loop }
}
}
Once you get that right, you can work on the nice-to-haves, like checking numbers guessed are within bounds, keeping track of how many guesses they've done, etc