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

17 lines
799 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 as string answer(0 to 19) = { "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 as string question
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*20))
print
loop