1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-11-16 09:26:09 -05:00
BCG101/port/NUMBER.BAS

38 lines
1.0 KiB
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
10 RANDOMIZE
11 PRINT "GUESS A NUMBER FROM 1 TO 5";
12 INPUT G
15 LET R=INT(5*RND(0))+1
16 LET S=INT(5*RND(0))+1
17 LET T=INT(5*RND(0))+1
18 LET U=INT(5*RND(0))+1
19 LET V=INT(5*RND(0))+1
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