Skip to content

lucassoliz/Number-Guessing-Game-test-c-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Number Guessing Game in C

This is a simple interactive game written in C where the user can choose between two game modes:

  1. Guessing a random number.
  2. Guessing a secret word.

The program demonstrates core programming concepts such as:

  • Modular code structure with separate files for headers, implementation, and the main program.
  • Use of functions, conditionals, and loops.
  • Basic use of random number generation. :P

Game Modes

1. Guess the Number

  • The program generates a random number between 1 and 100.
  • The user must guess the number.
  • The game ends when the user guesses the correct number.

2. Guess the Word

  • One player enters a secret word.
  • Another player attempts to guess the word by entering guesses.
  • The game ends when the correct word is guessed.

Features

  • Random number generation: Uses rand() for generating a random number.
  • String comparisons: Uses strcmp for word guessing logic.

Future Improvements

Here are some ideas for improving the game:

  • Add a scoring system based on the number of attempts.
  • Implement a timer to measure how quickly the user guesses.
  • Allow the user to define custom ranges for the random number.
  • Add more game modes or levels of difficulty.

yeh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages