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

24 lines
726 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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."