× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
j
4
m
4
4
4
n
3
m
3
R
3
V
3
e
3
w
3
j
3
a
3
New Topic  
Stromile Stromile
wrote...
Posts: 299
Rep: 0 0
6 years ago
The game of high-low is one where one person selects a number between 1 and 100 and a user tries to guess it by guessing a number and being told if the guessed number is the right number, too low or too high.  The user repeats guessing until getting the correct answer.  A logical user will always guess at the midpoint of the possible values (for instance, the first guess would be 50 followed by either 25 or 75, etc).  Write a recursive method to play the game of high-low by having the computer guess a midpoint.  The method should receive three parameters, the number itself, the lowest value in the range and the highest value in the range and return the number of guesses that it took to guess the right number.
Read 42 times
1 Reply
Replies
Answer verified by a subject expert
se7ense7en
wrote...
Posts: 327
Rep: 0 0
6 years ago
Sign in or Sign up in seconds to unlock everything for free
1

Related Topics

Stromile Author
wrote...

6 years ago
Helped a lot
wrote...

Yesterday
I appreciate what you did here, answered it right Smiling Face with Open Mouth
wrote...

2 hours ago
Thanks for your help!!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  864 People Browsing
Related Images
  
 197
  
 1214
  
 497
Your Opinion
Who will win the 2024 president election?
Votes: 19
Closes: November 4