10 PRINT "THINK OF A NUMBER BETWEEN 1 AND 100"
15 L=1:H=100:G=0
20 TM=TI
21 IF TI-TM < 90 THEN 21
30 X=INT(RND(1)*(H+1-L)+L)
40 PRINT "IS YOUR NUMBER "X" ?"
45 G=G+1
50 PRINT "(Y)ES (H)IGHER (L)OWER ";
60 A$="":INPUT A$
70 IF A$="Y" THEN PRINT "I'M SO SMART!!!! I TOOK "G" GUESSES" : GOTO 10
80 IF A$="H" THEN L=X+1: GOTO 20
90 IF A$="L" THEN H=X-1: GOTO 20
95 IF A$="Q" THEN END
100 PRINT "MUST ANSWER Y, H, OR L"
110 GOTO 60
