Guessing Game

C++

I am taking a course on Modern C++ for Computer Vision and Image Processing:

As part of the first homework, I had to write a program to do the following:

The program will pick a random number from 0 to 99 and the player will be guessing this number by providing a guess through stdin. Depending on
which number the player guessed there are 3 outcomes:
• The player guessed the number. Then the program has to tell that the player has won.
• Guessed number if larger than the target one. The program should tell that its number is smaller.
• Guessed number is smaller than the target one. The program should tell that its number is larger.
The game goes on until the player guesses the number.

Demo

--

--

PhD Student -- Signal and Systems Engineering, Halmstad http://pk.linkedin.com/in/talhahanifbutt

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store