How i can use my refined number as shown below :
1> game:num().
provide a number between 1 and 100 : 10.
10 is not my number. It is greater than 10.
provide a number between 11 and 100 : 44.
44 is not my number. It is lesser than 44.
provide a number between 1 and 43 :
Once you've refined the lower/upper bound, you have to use that. So the last message should be:
"provide a number between 11
and 43
".
答案 0 :(得分:2)
你只需要跟踪两个边界(上下)以达到你想要的效果。但是,我没有提供代码。