Magic 8-ball: Difference between revisions

add gwbasic
m (→‎{{header|8086 Assembly}}: clarified an unimplemented subroutine by removing unnecessary steps.)
(add gwbasic)
Line 968:
? :
</pre>
=={{header|GW-BASIC}}==
<lang gwbasic>0 DATA "It is certain.", "It is decidedly so."
20 DATA "Without a doubt.", "Yes - definitely."
30 DATA "You may rely on it.", "As I see it, yes."
40 DATA "Most likely.", "Outlook good."
50 DATA "Yes.", "Signs point to yes."
60 DATA "Reply hazy, try again.", "Ask again later."
70 DATA "Better not tell you now.", "Cannot predict now."
80 DATA "Concentrate and ask again.", "Don't count on it."
90 DATA "My reply is no.", "My sources say no."
100 DATA "Outlook not so good.", "Very doubtful."
110 DIM M8BALL$(20)
120 FOR I=0 TO 19
130 READ M8BALL$(I)
140 NEXT I
150 RANDOMIZE TIMER
160 INPUT "What would you like to know? ", Q$
170 PRINT M8BALL$(INT(RND*20))
180 END</lang>
 
=={{header|Haskell}}==
<lang haskell>import System.Random (getStdRandom, randomR)
781

edits