Question
Question-6: We want to write a program that implements the guess-the-number game. A secret number (say 71) is defined as a constant in the program.
Question-6: We want to write a program that implements the guess-the-number game. A secret number (say 71) is defined as a constant in the program. In the game, the player has to guess a secret number between 0 and 100. The user keeps entering a given number if it matches the secret number the program displays Congratulation!! otherwise it displays the message Lower if the number entered is larger than secret number, Higher otherwise. The program should display Sorry, try another time and terminates after 10 unsuccessful attempts. A C++ PROGRAM
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started