global text$
nomainwin
call cleartxt
call txt "This is a demonsration"
call newline
call txt "of the computers"
call newline
call txt "mind reading posebility"
call newline
call txt "please respond corectly ."
notice text$
call cleartxt
call txt "Think of a number"
call newline
call txt "between 1 and 127 ."
notice text$
som = 0
for m = 0 to 6
call cleartxt
call txt "Is your number with these ?"
call newline
for i = 1 to 127
tel = 0
if i and 2 ^ m then
call txt str$( i ) + " "
tel = tel + 1
if tel >= 10 then
tel = 0
call newline
end if
end if
next i
confirm text$ ; YN$
if YN$ = "yes" then
som = som + 2 ^ m
end if
next m
notice "Your number is " + str$( som )
end
sub cleartxt
text$ = "" + chr$( 13 )
end sub
sub txt a$
text$ = text$ + a$
end sub
sub newline
call txt chr$( 13 )
end sub