1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-12-24 02:57:38 -05:00
BCG101/dec/NUMBER.BAS

37 lines
928 B
QBasic
Raw Normal View History

1 PRINT " NUMBER GAME"
2 PRINT\PRINT "YOU NOW HAVE 100 POINTS"
3 PRINT "BY GUESSING NUMBERS FROM 1 TO 5, YOU CAN GAIN OR LOSE"
4 PRINT "POINTS DEPENDING UPON HOW CLOSE YOU GET TO A RANDOM"
5 PRINT "NUMBER SELECTED BY THE COMPUTER"\PRINT
6 PRINT "YOU OCCASIONALLY WILL GET A JACKPOT WHICH WILL DOUBLE(!)"
7 PRINT "YOUR POINT COUNT. YOU WIN WHEN YOU GET 500 POINTS."
8 PRINT\P=100
11 PRINT "GUESS A NUMBER FROM 1 TO 5";
12 INPUT G
15 LET R=INT(5*RND(0))
16 LET S=INT(5*RND(0))
17 LET T=INT(5*RND(0))
18 LET U=INT(5*RND(0))
19 LET V=INT(5*RND(0))
20 IF G=R THEN 30
21 IF G=S THEN 40
22 IF G=T THEN 50
23 IF G=U THEN 60
24 IF G=V THEN 70
25 IF G>5 THEN 11
30 LET P=P-5
35 GOTO 80
40 LET P=P+5
45 GOTO 80
50 LET P=P+P
53 PRINT "YOU HIT THE JACKPOT"
55 GOTO 80
60 LET P=P+1
65 GOTO 80
70 LET P=P-(P*.5)
80 IF P>500 THEN 90
82 PRINT "YOU HAVE";P;"POINTS"
85 GOTO 11
90 PRINT "!!!!YOU WIN!!!! WITH ";P;"POINTS."
99 END