This is a simple command-line based "Guess the Number" game in C. The game generates a random number between 1 and 100, and the player's objective is to guess the correct number. The program will provide hints for guessing higher or lower until the correct number is guessed.
- Random number generation between 1 and 100.
- Interactive gameplay with hints for the player.
- Keeps track of the number of attempts.
To get started with the game on your local machine, follow these steps:
- Clone the repository:
git clone /~https://github.com/megh-bari/guess-the-number-game.git
- Compile the code:
gcc guess_the_number.c -o guess_the_number
3.Run the game:
./guess_the_number
- The game will generate a random number between 1 and 100.
- You need to guess the number by entering an integer between 1 and 100.
- The game will provide hints:
- If your guess is higher than the target number, it will say "Lower number please!"
- If your guess is lower than the target number, it will say "Higher number please!"
- If your guess is correct, it will tell you how many attempts you took to guess the number.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to contribute, report issues, or suggest improvements. Enjoy the game!