Question: pls use C++ (e.g. microsoft visual studio 2017) Write a program to let the user guess the secret letter in the range 'A' to '
pls use C++ (e.g. microsoft visual studio 2017)
Write a program to let the user guess the secret letter in the range 'A' to ' Z ' (or ' a ' to ' z ') inclusively. The user can input any character and as many times as he/she wants until the input character is the same as the secret letter. For every incorrect guess, if the input letter (e.g. 'M') is within the range of that round (e.g. ' C ' to ' X '), the range is reduced to a smaller range by replacing the upper bound or lower bound by the input letter (e.g. 'M' to ' X '), such that the secret letter is still within the smaller range. Otherwise, the range remains unchanged. Then the program displays the range and let the user input again. Until the user inputs a correct guess, the program displays the number of times the user has guessed. Determine the odd or even version of this question using the 4th digit of your student ID number. CA. W. Even Version (even 4th digit in student ID) D...:-:.: 'A' + ' 7 ' Range: ' a ' to ' z ' Sas't n ' Secret letter: ' e ' Samin de. ta
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
