A fun and interactive Java console game where the computer randomly selects a number, and the player has to guess it!
- The program generates a random number within a given range.
- The player is prompted to guess the number.
- Hints like "Too high" or "Too low" are provided after each guess.
- The game continues until the correct number is guessed.
- Tracks the number of attempts taken.
- Java (JDK 8+)
- Console-based I/O
Welcome to Guess the Number!
I have selected a number between 1 and 100.
Try to guess it!
Enter your guess: 50
Too low!
Enter your guess: 75
Too high!
Enter your guess: 65
Congratulations! You guessed the number in 3 attempts.
Use it, share it, and improve it โ happy calculating!