Sha256: 73d42159a347c648043c33ae54291bd6cfd3f2832b51bbcb7973880e9e1907cc

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

10 PRINT TAB(34);"HI LO"
20 PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
30 PRINT:PRINT:PRINT
100 PRINT "THIS IS THE GAME OF HI LO.":PRINT
110 PRINT "YOU WILL HAVE 6 TRIES TO GUESS THE AMOUNT OF MONEY IN THE"
120 PRINT "HI LO JACKPOT, WHICH IS BETWEEN 1 AND 100 DOLLARS.  IF YOU"
130 PRINT "GUESS THE AMOUNT, YOU WIN ALL THE MONEY IN THE JACKPOT!"
140 PRINT "THEN YOU GET ANOTHER CHANCE TO WIN MORE MONEY.  HOWEVER,"
150 PRINT "IF YOU DO NOT GUESS THE AMOUNT, THE GAME ENDS.":PRINT
160 R=0
170 B=0:PRINT
180 Y=INT(100*RND(1))
200 PRINT "YOUR GUESS";
210 INPUT A
220 B=B+1
230 IF A=Y THEN 300
240 IF A>Y THEN 270
250 PRINT "YOUR GUESS IS TOO LOW.":GOTO 280
270 PRINT "YOUR GUESS IS TOO HIGH."
280 PRINT:IF B<6 THEN 200
290 PRINT "YOU BLEW IT...TOO BAD...THE NUMBER WAS";Y
295 R=0:GOTO 350
300 PRINT "GOT IT!!!!!!!!!!   YOU WIN";Y;"DOLLARS."
310 R=R+Y
320 PRINT "YOUR TOTAL WINNINGS ARE NOW";R;"DOLLARS."
350 PRINT:PRINT "PLAY AGAIN (YES OR NO)";
360 INPUT A$:IF A$="YES" THEN 170
380 PRINT:PRINT "SO LONG.  HOPE YOU ENJOYED YOURSELF!!!"
390 END

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
basic101-1.0.2 test/integration/tests/basic_computer_games/hilo.bas
basic101-1.0.1 test/integration/tests/basic_computer_games/hilo.bas
basic101-1.0.0 test/integration/tests/basic_computer_games/hilo.bas
basic101-0.4.0 test/integration/tests/basic_computer_games/hilo.bas
basic101-0.2.0 test/integration/tests/basic_computer_games/hilo.bas
basic101-0.1.0 test/integration/tests/basic_computer_games/hilo.bas