Question: 6. You are given the code below. It's a game where the user has to guess a secret number. The code doesn't contain any mistakes.

6. You are given the code below. It's a game where the user has to guess a secret number. The code doesn't contain any mistakes. Answer all the following questions: a. Where does the program gets the secret number from? b. How many attempts does the user have to guess the number before he/she loses? c. Write the output of the program if the secret number is 42 and the user provides the following input when asked: 16, 85, 52, 46. d. In the scenario described in (c) what is the value of variable i at the end of execution? #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
