Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

********Pls use the C++ codes to complete the following question2(don't use Python )************ Write a program to let the user guess the secret letter in

********Pls use the C++ codes to complete the following question2(don't use Python )************

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

Summarize various training methods.

Answered: 1 week ago

Question

2 What are the implications for logistics strategy?

Answered: 1 week ago