Guessing numbers

The following example is due to Leo Geurts (Centrum voor Wiskunde en Informatica, Amsterdam). By means of the halving algorithm it guesses a number chosen by the human opponent.


\begin{elan}
how to play :
tell the rules ;
all numbers 0 to 99 are possibl...
...F good
THEN
put ( ''Good!'' )
ELSE
put ( ''Cheat!'' )
FI .
\end{elan}