Guessing Game

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

--

--

--

MS Thesis Student, CVGL, LUMS http://pk.linkedin.com/in/talhahanifbutt

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

API-A Mediator Seamlessly Integrating Cloud Environments

Loki, Grafana, and Promtail integration using Docker.

Making Use of APIs in Your Front End

Integrating Lua with C: Part 7

YouTube Video | Website with HTML & CSS -1

Using a Separate Migrations Project

Tooploox Hackathon: Timeploox, Slack bot for time tracking

Learning Go Lang Days 21 to 25 — Deploying a Go Lang application to Kubernetes #100daysofcode

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
Talha Hanif Butt

Talha Hanif Butt

MS Thesis Student, CVGL, LUMS http://pk.linkedin.com/in/talhahanifbutt

More from Medium

A late introduction to Blockchain

My bet is on NVIDIA

Command Robotics Testing in Stellar TESTNET Environment

Depth Finding