RosettaCodeData/Task/Magic-8-ball/Liberty-BASIC/magic-8-ball.basic

19 lines
585 B
Plaintext

data "It is certain","It is decidedly so","Without a doubt","Yes - definitely",_
"You may rely on it","As I see it, yes","Most likely","Outlook good","Yes",_
"Signs point to yes","Reply hazy, try again","Ask again later","Better not tell you now",_
"Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no",_
"My sources say no","Outlook not so good","Very doubtful"
dim c$(20)
for a = 1 to 20
read b$
c$(a) = b$
next a
[loop]
input "Type your question: ";a$
if a$="" then end
d=int(rnd(1)*20)+1
print "Answer: ";c$(d)
goto [loop]