How to resolve the algorithm Magic 8-ball step by step in the Commodore BASIC programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Magic 8-ball step by step in the Commodore BASIC programming language
Table of Contents
Problem Statement
Create Magic 8-Ball.
See details at: Magic 8-Ball.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Magic 8-ball step by step in the Commodore BASIC programming language
Source code in the commodore programming language
10 dim f$(19):for i=0 to 19:read f$(i):next
20 print chr$(147);chr$(14)
30 print "Press any key to reveal your fortune."
40 print:print "Press Q to quit.":print
50 fo=int(rnd(1)*20):get k$:if k$="" then 50
60 if k$="q" then print "Good luck!":end
70 print "Your fortune reads:"
80 print spc(5);f$(fo):print
90 print "Again? (Y/N)"
100 get k$:if k$="" then 100
110 if k$="y" then goto 20
120 end
1000 data "It is certain.","It is decidedly so."
1010 data "Without a doubt.","Yes – definitely."
1020 data "You may rely on it.","As I see it, yes."
1030 data "Most likely.","Outlook good.","Yes."
1040 data "Signs point to yes.","Reply hazy, try again."
1050 data "Ask again later.","Better not tell you now."
1060 data "Cannot predict now.","Concentrate and ask again."
1070 data "Don't count on it.","My reply is no."
1080 data "My sources say no.","Outlook not so good."
1090 data "Very doubtful."
You may also check:How to resolve the algorithm Vigenère cipher/Cryptanalysis step by step in the C++ programming language
You may also check:How to resolve the algorithm Josephus problem step by step in the Fōrmulæ programming language
You may also check:How to resolve the algorithm Interactive programming (repl) step by step in the Jsish programming language
You may also check:How to resolve the algorithm Hello world/Text step by step in the Objective-C programming language
You may also check:How to resolve the algorithm Doubly-linked list/Traversal step by step in the FreeBASIC programming language