Design and implement an application that plays the High-Low guessing game with numbers. The program should pick a random number between 1 and 100 (inclusive) then repeatedly prompt the user to guess the number. Every time the user guess, inform him/her whether the guess is correct, or the guess is high or low. Continue accepting guesses until the user guesses correctly or chooses to surrender. Use a sentinel value to determine whether the user wants to quit. Count the number of guesses and display that value when the user guesses correctly. At the end of each game (either by quitting or a correct guess) prompt to determine whether the user wants to play again. Continue playing until the user chooses to stop. When the user stops playing, display the number of correct guesses and surrenders. The c++program should use suitable selection and repetition structures. The input process, guessing process and output must be organized into appropriate functions.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter12: Exception Handling
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
100%

Design and implement an application that plays the High-Low guessing game with numbers. The program should pick a random number between 1 and 100 (inclusive) then repeatedly prompt the user to guess the number. Every time the user guess, inform him/her whether the guess is correct, or the guess is high or low.
Continue accepting guesses until the user guesses correctly or chooses to surrender. Use a sentinel value to determine whether the user wants to quit. Count the number of guesses and display that value when the user guesses correctly. At the end of each game (either by quitting or a correct guess) prompt to determine whether the user wants to play again. Continue playing until the user chooses to stop. When the user stops playing, display the number of correct guesses and surrenders.
The c++program should use suitable selection and repetition structures. The input process, guessing process and output must be organized into appropriate functions.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,