Create a simple number guessing game before the game starts


Number Guessing Game

Here is the question in its entirety, but the actual problem is at the end. I just felt that I would give an overview of what I am asking. The program has to be in c++ (.cpp) and must compile as such. I use linux.

This project introduces you to the basics of C++ programming.

Create a simple number guessing game. Before the game starts, your program will randomly select a number between one and ten. When the game begins ask the player "Guess the computer's number: ". The player is allowed a single guess. Accept the guess as input. Your program will compare the random number with the guess.

If the guess is correct, tell the player "You, guessed correctly! You win!".

If the guess is wrong, tell the player "I'm sorry, that is not correct. You lose."

Allow the player to select the difficulty level (easy, medium, or hard) which affects the range of the random number and the number of guesses the player is allowed:

Easy: 3 guesses, random number between 1 and 10

Medium: 4 guesses, random number between 1 and 50

Hard: 5 guesses, random number between 1 and 100

With each guess the player is told whether the random number is "higher" or "lower".

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create a simple number guessing game before the game starts
Reference No:- TGS02877846

Expected delivery within 24 Hours