Initial Commit
This commit is contained in:
BIN
bin/main.bas
Normal file
BIN
bin/main.bas
Normal file
Binary file not shown.
27
src/main.bas
Normal file
27
src/main.bas
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
10 print chr$(147)
|
||||||
|
20 print "dan's guessing game"
|
||||||
|
30 input "enter first number";usernum
|
||||||
|
40 asdf = rnd(0)*usernum
|
||||||
|
50 print int(guessnum)
|
||||||
|
60 input "how many guesses do you want?"; numofguesses
|
||||||
|
70 guessnum = 1
|
||||||
|
80 if guessnum <> numofguesses then goto 80
|
||||||
|
90 if guessnum > numofguesses then goto 170
|
||||||
|
100 print "guess "guessnum" :"
|
||||||
|
110 input "enter your guess";guess
|
||||||
|
120 if guess = asdf then goto 220
|
||||||
|
130 if guess <> asdf then goto 150
|
||||||
|
140 guessnum = guessnum+1
|
||||||
|
150 print "you suck"
|
||||||
|
160 goto 80
|
||||||
|
170 print "too many guesses"
|
||||||
|
170 input "play again? y/n";again$
|
||||||
|
180 if again$ = "y" then goto 10
|
||||||
|
190 if again$ <> "n" then goto 500
|
||||||
|
200 end
|
||||||
|
210 if again$ <> "n" then goto 500
|
||||||
|
220 print "good job"
|
||||||
|
230 input "play again? y/n";again$
|
||||||
|
240 if again$ = "y" then goto 10
|
||||||
|
250 if again$ <> "n" then goto 500
|
||||||
|
500 end
|
||||||
Reference in New Issue
Block a user