Giter Site home page Giter Site logo

aagamaj / guess-the-number-game Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

This is a simple number guessing game implemented in C++. Program generates a random number between 1-100 and asks the user to guess the number. After each guess, program provides feedback (higher or lower) to help user guess the correct number. Once the user guesses the correct number, the program displays the number of attempts took to guess it.

C++ 100.00%
conditional-statements cpp ifelse randomnumbergenerator while-loop dowhileloop

guess-the-number-game's Introduction

Guess-The-Number-GAME

Description

This is a simple number guessing game implemented in C++. The program generates a random number between 1 and 100, and the user has to guess the number. After each guess, the program provides feedback (higher or lower) to help the user narrow down the correct number. Once the user guesses the correct number, the program displays the number of attempts it took to guess the number correctly.

How to Play

  1. Clone the repository or download the project.cpp file.
  2. Compile the C++ code using a C++ compiler of your choice.
  3. Run the compiled executable in your terminal or command prompt.
  4. The program will ask you to guess a number between 1 and 100.
  5. Enter your guess and press Enter.
  6. The program will provide feedback on whether the correct number is higher or lower than your guess.
  7. Continue guessing until you find the correct number.
  8. Once you guess the correct number, the program will display the number of attempts it took.

Example

Guess the number between 1 to 100
50
Higher Number please!
75
Lower Number please!
63
You guessed it in 3 attempts

Contributing

Contributions are welcome! If you find any issues or have ideas to improve the game, feel free to open an issue or create a pull request.

Contact

For any questions or inquiries, please contact me through my Email: [email protected] (Aagam Jain)

guess-the-number-game's People

Contributors

aagamaj 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.