Giter Club home page Giter Club logo

numbergame's Introduction

Number Guessing Game

This is a simple number guessing game implemented in C++ where the player tries to guess a randomly generated number between 1 and 100 within a limited number of attempts.

How to Play

  1. Upon running the program, the player is welcomed and informed that a random number between 1 and 100 has been selected.
  2. The player is provided with hints about the nature of the secret number (even or odd).
  3. The player is prompted to enter their guess.
  4. If the input is invalid (not a number between 1 and 100), an error message is displayed, and the player is prompted to enter a valid guess.
  5. After each guess, the program provides feedback whether the guess is too high or too low, along with hints about the proximity to the secret number.
  6. The game continues until the player correctly guesses the number or runs out of attempts.
  7. If the player runs out of attempts, the correct number is revealed.

Features

  • Randomly generated secret number between 1 and 100.
  • Maximum of 7 attempts allowed.
  • Hints about whether the secret number is even or odd.
  • Feedback on the proximity of the guessed number to the secret number.
  • Input validation for ensuring the entered number is within the valid range.

How to Run

  1. Clone the repository.
  2. Compile the code using a C++ compiler.
  3. Execute the compiled binary.

Acknowledgments

  • This program is inspired by classic number guessing games.
  • Special thanks to the C++ community for helpful resources and discussions.

numbergame's People

Contributors

jdecho1118 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.