23 lines
252 B
Text
23 lines
252 B
Text
let n = int(rnd * 100) + 1
|
|
|
|
do
|
|
|
|
let t = t + 1
|
|
|
|
input "guess the number between 1 and 100", g
|
|
|
|
if g < n then
|
|
|
|
alert "guess higher"
|
|
|
|
endif
|
|
|
|
if g > n then
|
|
|
|
alert "guess lower"
|
|
|
|
endif
|
|
|
|
loop g <> n
|
|
|
|
alert "you guessed the number in ", t, " tries"
|