Question: The Guess Number example above is a bit boring because the user gets an unlimited number of attempts to find the answer. You will make

The Guess Number example above is a bit boring because the user gets an unlimited number of
attempts to find the answer. You will make it more interesting by only allowing the user to guess up to 5
times.
You will need to use a complex condition for the while loop. One part of the complex condition is
whether the user has guessed the number (similar to how it is done in the example), and the other part
is a counter that only lets the user have 5 guesses. Complex conditions with while loops are similar to
those with if statements, and you separate the conditions with a boolean operator (&& or ||)
Your output should look similar to the sample output below for Program #1. Turn in your completed
program
Can you be specific on the code and make sure you use the boolean operator for example(&& or ||). The output should look like this.
SAMPLE OUTPUT for Program \#1
```
Welcome: I have chosen a random number between 1 and 1GG. Try to guess it!
What is your guess: 50
Too high! Give it another shot?
What is your guess: 25
That guess is too low; Try again!
What is your guess: 37
That guess is too low; Try again!
What is your guess: 43
That guess is too low; Try again?
What is your guess; 45
That guess is too low; Try again?
Aww, sorryy. You lose?
Press any key to continue ---
```
The Guess Number example above is a bit boring

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!