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

24 lines
726 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
DIM answer$(19)
FOR i = 0 TO UBOUND(answer$): READ answer$(i): NEXT i
RANDOMIZE TIMER
PRINT "Q to quit."
DO
INPUT "What would you like to know? ", question$
IF UCASE$(question$) = "Q" THEN EXIT DO
PRINT answer$(INT(RND * UBOUND(answer$)))
PRINT
LOOP
END
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."