三角函数怎么引用

找到了某个猜数字程序。猜了若干次,有一次结果是

代码:
range[a, b]:1 1000
I think I can guess in 10 times.
I guess 500. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 250. Is it right(0), smaller(1) or bigger(2)?
1
Smaller, well, I guess 375. Is it right(0), smaller(1) or bigger(2)?
1
Smaller, well, I guess 437. Is it right(0), smaller(1) or bigger(2)?
1
Smaller, well, I guess 468. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 452. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 444. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 440. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, I guess 438. Is it right(0), smaller(1) or bigger(2)?
2
Bigger, well, Hey, you are cheating me!
Since you've said your number was bigger than 437, hmmm, Aha, your number must be 438.
I've guessed it in 9 times. I won.


它是怎么知道我在故意“耍”它的?大家能不能写一段类似的程序实现以上功能?最好是C的。

作者: vb2vc   发布时间: 2011-05-20

2的10次方等于1024>1000

作者: 月下叹逍遥   发布时间: 2011-05-20

月下叹逍遥 写道:
2的10次方等于1024>1000


我主要问的是
引用:
well, Hey, you are cheating me!
Since you've said your number was bigger than 437, hmmm, Aha, your number must be 438.
这一段是怎么判断出的。

作者: vb2vc   发布时间: 2011-05-20