RosettaCodeData/Task/Magic-8-ball/Yabasic/magic-8-ball.basic

22 lines
720 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
dim answer$(19)
for i = 0 to arraysize(answer$(),1): read answer$(i): next i
print "Q to quit."
do
input "What would you like to know? " question$
if upper$(question$) = "Q" then end : fi
print answer$(int(ran(arraysize(answer$(),1))))
print
loop
data "It is certain.","It is decidedly so."
data "Without a doubt.","Yes definitely."
data "You may rely on it.","As I see it, yes."
data "Most likely.","Outlook good.","Yes."
data "Signs point to yes.","Reply hazy, try again."
data "Ask again later.","Better not tell you now."
data "Cannot predict now.","Concentrate and ask again."
data "Don//t count on it.","My reply is no."
data "My sources say no.","Outlook not so good."
data "Very doubtful."