Generate any random number between 1 and 10 by using Random Function then guess that number in maximum three attempts and if you successfully guess the number, display the message “Congratulation your guess is correct” else display “sorry your guess is incorrect”.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter1: An Overview Of Computers And Programming Languages
Section: Chapter Questions
Problem 18SA: 18. Tom and Jerry opened a new lawn service. They provide three types of services: mowing,...
icon
Related questions
icon
Concept explainers
Question

Generate any random number between 1 and 10 by using Random Function then guess
that number in maximum three attempts and if you successfully guess the number,
display the message “Congratulation your guess is correct” else display “sorry your guess
is incorrect”.

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning