Skip to content

This is a console-based game written in C where players guess a randomly generated number. Hints like "Too high!" or "Too low!" are provided to guide the player. Tracks the number of attempts taken to guess correctly. Includes features like random number generation and a user-friendly interface.

License

Notifications You must be signed in to change notification settings

Sougata2006/Number-Guessing-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Number Guessing Game in C

Welcome to the Number Guessing Game!
This is a fun terminal-based game written in C, where the user tries to guess a randomly generated number.


๐Ÿ“œ Game Description

  • A random number is generated within a specified range.
  • The user is prompted to guess the number.
  • Hints such as "Too High!" or "Too Low!" help guide the player.
  • The game continues until the correct number is guessed.
  • The total number of attempts is displayed at the end.

๐ŸŒŸ Features

  • โœ… Random number generation
  • โœ… User-friendly console interface
  • โœ… Helpful hints for easier guessing
  • โœ… Tracks the total number of attempts

๐ŸŽฎ Sample Gameplay

Guess the number: 6  
HIGHER NUMBER PLEASE!

Guess the number: 67  
HIGHER NUMBER PLEASE!

Guess the number: 89  
LOWER NUMBER PLEASE!!

Guess the number: 80  
LOWER NUMBER PLEASE!!

Guess the number: 75  
HIGHER NUMBER PLEASE!

Guess the number: 78  
LOWER NUMBER PLEASE!!

Guess the number: 77  
Congrats! ๐ŸŽ‰  
You guessed the number in 7 guesses!

๐Ÿ› ๏ธ Technologies Used

  • C Programming Language
  • GCC Compiler

๐Ÿ’ก How to Run

  1. Clone or download this repository.
  2. Open the folder in your terminal or IDE.
  3. Compile the program using:
   gcc number_guessing_game.c -o game
  1. Run the executable:
   ./game

About

This is a console-based game written in C where players guess a randomly generated number. Hints like "Too high!" or "Too low!" are provided to guide the player. Tracks the number of attempts taken to guess correctly. Includes features like random number generation and a user-friendly interface.

Resources

License

Stars

Watchers

Forks

Languages