mirror of
https://github.com/rfivet/BCG101.git
synced 2025-01-20 16:28:01 -05:00
Add CHEMIST, DIAMND, DICE, GUESS, HILO, KINEMA, LETTER, NICOMA, NUMBER, ROCKSP, RUSROU.
This commit is contained in:
parent
1d798092c1
commit
529dcace19
25
dec/CHEMIST.BAS
Normal file
25
dec/CHEMIST.BAS
Normal file
@ -0,0 +1,25 @@
|
||||
10 PRINT "THE FICTITIOUS CHEMICAL KRYPTOCYANIC ACID CAN ONLY BE"
|
||||
20 PRINT "DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACIE."
|
||||
30 PRINT "IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE"
|
||||
40 PRINT "AND SOON EXPLODES. GIVEN THE AMOUNT OF ACID, YOU MUST"
|
||||
50 PRINT "DECIDE HOW MUCH WATER TO ADD FOR DILUTION. IF YOU MISS"
|
||||
60 PRINT "YOU FACE THE CONSEQUENCES."
|
||||
100 LET A=INT(RND(1)*50)
|
||||
110 LET W=7*A/3
|
||||
120 PRINT A"LITERS OF KRYPTOCYANIC ACID. HOW MUCH WATER";
|
||||
130 INPUT R
|
||||
140 LET D=ABS(W-R)
|
||||
150 IF D>W/20 THEN 200
|
||||
160 PRINT "GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!"
|
||||
170 PRINT
|
||||
180 GO TO 100
|
||||
200 PRINT "SIZZLE! YOU HAVE JUST BEEN DESALINATED INTO A BLOB"
|
||||
210 PRINT "OF QUIVERING PROTOPLASM!"
|
||||
220 LET T=T+1
|
||||
230 IF T=9 THEN 260
|
||||
240 PRINT "HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE."
|
||||
245 PRINT
|
||||
250 GO TO 100
|
||||
260 PRINT "YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR"
|
||||
270 PRINT "YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY."
|
||||
280 END
|
30
dec/DIAMND.BAS
Normal file
30
dec/DIAMND.BAS
Normal file
@ -0,0 +1,30 @@
|
||||
3 PRINT "FOR A PRETTY DIAMOND PATTERN,"
|
||||
4 PRINT "TYPE IN AN ODD NUMBER BETWEEN 5 AND 31."
|
||||
5 INPUT R\PRINT
|
||||
6 Q=INT(60/R)
|
||||
8 FOR L=1 TO Q
|
||||
10 X=1\Y=R\Z=2
|
||||
20 FOR N=X TO Y STEP Z
|
||||
25 PRINT TAB((R-N)/2);
|
||||
28 FOR M=1 TO Q
|
||||
29 C=1
|
||||
30 FOR A=1 TO N
|
||||
31 IF C=1 THEN 40
|
||||
32 IF C=2 THEN 42
|
||||
33 IF C=3 THEN 44
|
||||
35 PRINT "!";\GOTO 50
|
||||
40 PRINT "D";\GOTO 47
|
||||
42 PRINT "E";\GOTO 47
|
||||
44 PRINT "C";
|
||||
47 C=C+1
|
||||
50 NEXT A
|
||||
53 IF M=Q THEN 60
|
||||
55 PRINT TAB(R*M+(R-N)/2);
|
||||
56 NEXT M
|
||||
60 PRINT
|
||||
70 NEXT N
|
||||
83 IF X<>1 THEN 95
|
||||
85 X=R-2\Y=1\Z=-2
|
||||
90 GOTO 20
|
||||
95 NEXT L
|
||||
99 END
|
27
dec/DICE.BAS
Normal file
27
dec/DICE.BAS
Normal file
@ -0,0 +1,27 @@
|
||||
10 DIM F(12)
|
||||
20 REM DANNY FREIDUS
|
||||
30 PRINT "THIS PROGRAM SIMULATES THE ROLLING OF A"
|
||||
40 PRINT "PAIR OF DICE."
|
||||
50 PRINT "YOU ENTER THE NUMBER OF TIMES YOU WANT THE COMPUTER"
|
||||
60 PRINT "TO 'ROLL' THE DICE. WATCH OUT, VERY LARGE NUMBERS TAKE"
|
||||
70 PRINT "A LONG TIME, IN PARTICULAR, NUMBERS OVER 5000."
|
||||
80 FOR Q=1 TO 12
|
||||
90 F(Q)=0
|
||||
100 NEXT Q
|
||||
110 PRINT\PRINT "HOW MANY ROLLS";
|
||||
120 INPUT X
|
||||
130 FOR S=1 TO X
|
||||
140 A=INT(6*RND(1)+1)
|
||||
150 B=INT(6*RND(1)+1)
|
||||
160 R=A+B
|
||||
170 F(R)=F(R)+1
|
||||
180 NEXT S
|
||||
185 PRINT
|
||||
190 PRINT "TOTAL SPOTS","NUMBER OF TIMES"
|
||||
200 FOR V=2 TO 12
|
||||
210 PRINT V,F(V)
|
||||
220 NEXT V
|
||||
222 PRINT\PRINT "TRY AGAIN";
|
||||
223 INPUT Z$
|
||||
224 IF Z$="YES" THEN 80
|
||||
240 END
|
37
dec/GUESS.BAS
Normal file
37
dec/GUESS.BAS
Normal file
@ -0,0 +1,37 @@
|
||||
1 PRI "THIS IS A NUMBER GUESSING GAME. I'LL THINK"
|
||||
2 PRI "OF A NUMBER BETWEEN 1 AND ANY LIMIT YOU WANT."
|
||||
3 PRI "THEN YOU HAVE TO GUESS WHAT IT IS."
|
||||
4 PRI
|
||||
5 PRI "WHAT LIMIT DO YOU WANT";
|
||||
6 INPL
|
||||
7 PRI
|
||||
8 L1=INT(LOG(L)/LOG(2))+1
|
||||
10 PRI"I'M THINKING OF A NUMBER BETWEEN 1 AND"L
|
||||
11 G=1
|
||||
14 PRI "NOW YOU TRY TO GUESS WHAT IT IS"
|
||||
15 M=INT(L*RND(0)+1)
|
||||
20 INP N
|
||||
21 IF N>0 THEN 25
|
||||
22 GOSUB70
|
||||
23 GOTO1
|
||||
25 IF N=M THEN 50
|
||||
30 G=G+1
|
||||
31 IF N>M THEN 40
|
||||
32 PRI "TOO LOW. GUESS AGAIN."
|
||||
33 GOTO 20
|
||||
40 PRI "TOO HIGH. GUESS AGAIN."
|
||||
42 GOTO 20
|
||||
50 PRI "THAT'S IT! YOU GOT IT IN"G"TRIES.
|
||||
52 IF G<L1 THEN 58
|
||||
54 IF G=L1 THEN 60
|
||||
56 PRI"YOU SHOULD HAVE BEEN ABLE TO GET IT IN ONLY"L1".
|
||||
57 GOT 65
|
||||
58 PRI"VERY ";
|
||||
60 PRI"GOOD!
|
||||
65 GOSUB70
|
||||
66 GOTO10
|
||||
70 FOR H=1 TO 5
|
||||
71 PRI
|
||||
72 NEXT H
|
||||
73 RETURN
|
||||
99 END
|
26
dec/HILO.BAS
Normal file
26
dec/HILO.BAS
Normal file
@ -0,0 +1,26 @@
|
||||
90 RANDOMIZE
|
||||
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 1AND 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)
|
||||
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\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
|
36
dec/KINEMA.BAS
Normal file
36
dec/KINEMA.BAS
Normal file
@ -0,0 +1,36 @@
|
||||
100 PRINT
|
||||
105 PRINT
|
||||
106 Q=0
|
||||
110 V=5+INT(35*RND(0))
|
||||
111 PRINT "A BALL IS THROWN UPWARDS AT"V"METERS PER SECOND."
|
||||
112 PRINT
|
||||
115 A=V^2/19.6
|
||||
116 PRINT "HOW HIGH WILL IT GO (IN METERS)";
|
||||
117 GOSUB 500
|
||||
120 A=V/4.9
|
||||
122 PRINT "HOW LONG UNTIL IT RETURNS (IN SECONDS)";
|
||||
124 GOSUB 500
|
||||
130 T=1+INT(2*V*RND(1))/10
|
||||
132 A=V-9.8*T
|
||||
134 PRINT "WHAT WILL ITS VELOCITY BE AFTER"T"SECONDS";
|
||||
136 GOSUB 500
|
||||
140 PRINT
|
||||
150 PRINT Q"RIGHT OUT OF 3.";
|
||||
160 IF Q<2 THEN 100
|
||||
170 PRINT " NOT BAD."
|
||||
180 GOTO 100
|
||||
500 INPUT G
|
||||
501 G=100*ABS(G-A)
|
||||
502 IF G<=ABS(A) THEN 507
|
||||
503 IF G<=15*ABS(A) THEN 510
|
||||
504 PRINT "NOT EVEN CLOSE...."
|
||||
506 GOTO 512
|
||||
507 Q=Q+1
|
||||
508 PRI"CORRECT! VERY GOOD!
|
||||
509 GOTO 520
|
||||
510 PRINT "CLOSE ENOUGH."
|
||||
511 Q=Q+1
|
||||
512 PRINT "CORRECT ANSWER IS "A
|
||||
520 PRINT
|
||||
530 RETURN
|
||||
999 END
|
24
dec/LETTER.BAS
Normal file
24
dec/LETTER.BAS
Normal file
@ -0,0 +1,24 @@
|
||||
90 RANDOMIZE
|
||||
100 PRINT "LETTER GUESSING GAME"\PRINT
|
||||
210 PRINT "I'LL THINK OF A LETTER OF THE ALPHABET, A TO Z."
|
||||
220 PRINT "TRY TO GUESS MY LETTER AND I'LL GIVE YOU CLUES"
|
||||
230 PRINT "AS TO HOW CLOSE YOU'RE GETTING TO MY LETTER."
|
||||
310 L=65+INT(RND(0)*26)
|
||||
320 G=0
|
||||
340 PRINT\PRINT "OK, I HAVE A LETTER. START GUESSING."
|
||||
410 PRINT\PRINT "WHAT IS YOUR GUESS?";
|
||||
420 G=G+1
|
||||
430 INPUT $A\PRINT
|
||||
440 IF A=L THEN 500
|
||||
450 IF A>L THEN 480
|
||||
460 PRINT "TOO LOW. TRY A HIGHER LETTER."\GOTO 410
|
||||
480 PRINT "TOO HIGH. TRY A LOWER LETTER."\GOTO 410
|
||||
500 PRINT\PRINT "YOU GOT IT IN"G"GUESSES!!"
|
||||
504 IF G<=5 THEN 508
|
||||
506 PRINT "BUT IT SHOULDN'T TAKE MORE THAN 5 GUESSES!"\GOTO 515
|
||||
508 PRINT "GOOD JOB !!!!!"
|
||||
510 FOR N=1 TO 15\PRINT CHR$(7);\NEXT N
|
||||
515 PRINT
|
||||
520 PRINT "LET'S PLAY AGAIN....."
|
||||
530 GOTO 310
|
||||
999 END
|
31
dec/NICOMA.BAS
Normal file
31
dec/NICOMA.BAS
Normal file
@ -0,0 +1,31 @@
|
||||
10 PRINT "BOOMERANG PUZZLE FROM ARITHMETICA OF NICOMACHUS -- A.D. 90!"
|
||||
20 PRINT
|
||||
30 PRINT "PLEASE THINK OF A NUMBER BETWEEN 1 AND 100."
|
||||
40 PRINT "YOUR NUMBER DIVIDED BY 3 HAS A REMAINDER OF";
|
||||
45 INPUT A
|
||||
50 PRINT "YOUR NUMBER DIVIDED BY 5 HAS A REMAINDER OF";
|
||||
55 INPUT B
|
||||
60 PRINT "YOUR NUMBER DIVIDED BY 7 HAS A REMAINDER OF";
|
||||
65 INPUT C
|
||||
70 PRINT
|
||||
80 PRINT "LET ME THINK A MOMENT...."
|
||||
90 SLEEP(5)
|
||||
100 D=70*A+21*B+15*C
|
||||
110 IF D<=105 THEN 140
|
||||
120 D=D-105
|
||||
130 GOTO 110
|
||||
140 PRINT
|
||||
150 PRINT "YOUR NUMBER WAS"D", RIGHT";
|
||||
160 INPUT A$
|
||||
165 PRINT
|
||||
170 IF A$="YES" THEN 220
|
||||
180 IF A$="NO" THEN 240
|
||||
190 PRINT "EH? I DON'T UNDERSTAND '"A$"' TRY 'YES' OR 'NO'"
|
||||
200 GOTO 150
|
||||
220 PRINT "HOW ABOUT THAT!!"
|
||||
230 GOTO 250
|
||||
240 PRINT "I FEEL YOUR ARITHMETIC IS IN ERROR."
|
||||
250 PRINT
|
||||
260 PRINT "LET'S TRY ANOTHER."
|
||||
270 GOTO 20
|
||||
999 END
|
36
dec/NUMBER.BAS
Normal file
36
dec/NUMBER.BAS
Normal file
@ -0,0 +1,36 @@
|
||||
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
|
33
dec/ROCKSP.BAS
Normal file
33
dec/ROCKSP.BAS
Normal file
@ -0,0 +1,33 @@
|
||||
1 PRINT "THIS PROGRAM ALLOWS YOU TO PLAY THE OLD GAME OF"
|
||||
2 PRINT "ROCKS, PAPER, AND SISSORS AGAINST THE COMPUTER."
|
||||
5 RANDOMIZE
|
||||
6 INPUT "HOW MANY GAMES DO YOU WANT";Q
|
||||
8 IF Q<11 THEN 11
|
||||
9 PRINT "SORRY, BUT WE AREN'T ALLOWED TO PLAY THAT MANY."\GOTO 6
|
||||
11 FOR G=1 TO Q
|
||||
15 PRINT\PRINT "GAME NUMBER"G
|
||||
20 X=INT(RND*3+1)
|
||||
25 PRINT "3=ROCK...2=SISSORS...1=PAPER"
|
||||
30 INPUT "1....2....3....WHAT'S YOUR CHOICE";K
|
||||
32 IF (K-1)*(K-2)*(K-3)<>0 THEN PRINT "INVALID"\GOTO 25
|
||||
35 PRINT "THIS IS MY CHOICE..."
|
||||
40 ON X GOTO 50,60,70
|
||||
50 PRINT "...PAPER"\GOTO 80
|
||||
60 PRINT "...SISSORS"\GOTO 80
|
||||
70 PRINT "...ROCK"
|
||||
80 IF X=K THEN 155
|
||||
85 IF X>K THEN 125
|
||||
90 IF X=1 THEN 105
|
||||
95 PRINT "YOU WIN!!!"\H=H+1\GOTO 160
|
||||
105 IF K=3 THEN 115 ELSE GOTO 95
|
||||
115 PRINT "WOW! I WIN!!"\C=C+1\GOTO 160
|
||||
125 IF K<>1 THEN 115
|
||||
140 IF X<>3 THEN 115 ELSE 95
|
||||
155 PRINT "TIE GAME, NO WINNER."
|
||||
160 NEXT G
|
||||
170 PRINT\PRINT "HERE IS THE FINAL SCORE:"
|
||||
175 PRINT "I HAVE WON"C"GAME(S)."
|
||||
180 PRINT "YOU HAVE WON"H"GAME(S)."
|
||||
185 PRINT "AND"G-(C+H)"GAME(S) ENDED IN A TIE."
|
||||
190 PRINT\PRINT "THANKS FOR PLAYING!!"
|
||||
200 END
|
21
dec/RUSROU.BAS
Normal file
21
dec/RUSROU.BAS
Normal file
@ -0,0 +1,21 @@
|
||||
5 RANDOMIZE
|
||||
8 PRINT "THIS IS A GAME OF >>>>>>>>>>>RUSSIAN ROULETTE."
|
||||
10 PRINT\PRINT "HERE IS A REVOLVER"
|
||||
20 PRINT "HIT '1' TO SPIN CHAMBER AND PULL TRIGGER."
|
||||
22 PRINT " (HIT '2' TO GIVE UP)"\PRINT "GO";
|
||||
25 N=0
|
||||
30 INPUT I
|
||||
31 IF I<>2 THEN 35
|
||||
32 PRINT " CHICKEN !!!"\GOTO 72
|
||||
35 N=N+1
|
||||
40 IF RND(0)>0.83333 THEN 70
|
||||
45 IF N>10 THEN 80
|
||||
50 PRINT "- CLICK -"
|
||||
60 PRINT\GOTO 30
|
||||
70 PRINT " BANG!!!! YOU'RE DEAD!"
|
||||
71 PRINT "CONDOLENCES WILL BE SENT TO YOUR RELATIVES."
|
||||
72 PRINT\PRINT\PRINT\PRINT "...NEXT VICTIM..."\GOTO 20
|
||||
80 PRINT "YOU WIN !!!"
|
||||
85 PRINT "LET SOMEONE ELSE BLOW HIS BRAINS OUT."
|
||||
90 GOTO 10
|
||||
99 END
|
26
port/CHEMIST.BAS
Normal file
26
port/CHEMIST.BAS
Normal file
@ -0,0 +1,26 @@
|
||||
10 PRINT "THE FICTITIOUS CHEMICAL KRYPTOCYANIC ACID CAN ONLY BE"
|
||||
20 PRINT "DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACID."
|
||||
30 PRINT "IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE"
|
||||
40 PRINT "AND SOON EXPLODES. GIVEN THE AMOUNT OF ACID, YOU MUST"
|
||||
50 PRINT "DECIDE HOW MUCH WATER TO ADD FOR DILUTION. IF YOU MISS"
|
||||
60 PRINT "YOU FACE THE CONSEQUENCES."
|
||||
90 RANDOMIZE
|
||||
100 LET A=INT(RND(1)*50)+1
|
||||
110 LET W=7*A/3
|
||||
120 PRINT A"LITERS OF KRYPTOCYANIC ACID. HOW MUCH WATER";
|
||||
130 INPUT R
|
||||
140 LET D=ABS(W-R)
|
||||
150 IF D>W/20 THEN 200
|
||||
160 PRINT "GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!"
|
||||
170 PRINT
|
||||
180 GO TO 100
|
||||
200 PRINT "SIZZLE! YOU HAVE JUST BEEN DESALINATED INTO A BLOB"
|
||||
210 PRINT "OF QUIVERING PROTOPLASM!"
|
||||
220 LET T=T+1
|
||||
230 IF T=9 THEN 260
|
||||
240 PRINT "HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE."
|
||||
245 PRINT
|
||||
250 GO TO 100
|
||||
260 PRINT "YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR"
|
||||
270 PRINT "YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY."
|
||||
280 END
|
30
port/DIAMND.BAS
Normal file
30
port/DIAMND.BAS
Normal file
@ -0,0 +1,30 @@
|
||||
3 PRINT "FOR A PRETTY DIAMOND PATTERN,"
|
||||
4 PRINT "TYPE IN AN ODD NUMBER BETWEEN 5 AND 31."
|
||||
5 INPUT R\PRINT
|
||||
6 Q=INT(60/R)
|
||||
8 FOR L=1 TO Q
|
||||
10 X=1\Y=R\Z=2
|
||||
20 FOR N=X TO Y STEP Z
|
||||
25 PRINT TAB((R-N)/2);
|
||||
28 FOR M=1 TO Q
|
||||
29 C=1
|
||||
30 FOR A=1 TO N
|
||||
31 IF C=1 THEN 40
|
||||
32 IF C=2 THEN 42
|
||||
33 IF C=3 THEN 44
|
||||
35 PRINT "!";\GOTO 50
|
||||
40 PRINT "D";\GOTO 47
|
||||
42 PRINT "E";\GOTO 47
|
||||
44 PRINT "C";
|
||||
47 C=C+1
|
||||
50 NEXT A
|
||||
53 IF M=Q THEN 60
|
||||
55 PRINT TAB(R*M+(R-N)/2);
|
||||
56 NEXT M
|
||||
60 PRINT
|
||||
70 NEXT N
|
||||
83 IF X<>1 THEN 95
|
||||
85 X=R-2\Y=1\Z=-2
|
||||
90 GOTO 20
|
||||
95 NEXT L
|
||||
99 END
|
28
port/DICE.BAS
Normal file
28
port/DICE.BAS
Normal file
@ -0,0 +1,28 @@
|
||||
5 RANDOMIZE
|
||||
10 DIM F(12)
|
||||
20 REM DANNY FREIDUS
|
||||
30 PRINT "THIS PROGRAM SIMULATES THE ROLLING OF A"
|
||||
40 PRINT "PAIR OF DICE."
|
||||
50 PRINT "YOU ENTER THE NUMBER OF TIMES YOU WANT THE COMPUTER"
|
||||
60 PRINT "TO 'ROLL' THE DICE. WATCH OUT, VERY LARGE NUMBERS TAKE"
|
||||
70 PRINT "A LONG TIME, IN PARTICULAR, NUMBERS OVER 5000."
|
||||
80 FOR Q=1 TO 12
|
||||
90 F(Q)=0
|
||||
100 NEXT Q
|
||||
110 PRINT\PRINT "HOW MANY ROLLS";
|
||||
120 INPUT X
|
||||
130 FOR S=1 TO X
|
||||
140 A=INT(6*RND(1)+1)
|
||||
150 B=INT(6*RND(1)+1)
|
||||
160 R=A+B
|
||||
170 F(R)=F(R)+1
|
||||
180 NEXT S
|
||||
185 PRINT
|
||||
190 PRINT "TOTAL SPOTS","NUMBER OF TIMES"
|
||||
200 FOR V=2 TO 12
|
||||
210 PRINT V,F(V)
|
||||
220 NEXT V
|
||||
222 PRINT\PRINT "TRY AGAIN";
|
||||
223 INPUT Z$
|
||||
224 IF Z$="YES" THEN 80
|
||||
240 END
|
38
port/GUESS.BAS
Normal file
38
port/GUESS.BAS
Normal file
@ -0,0 +1,38 @@
|
||||
1 PRINT "THIS IS A NUMBER GUESSING GAME. I'LL THINK"
|
||||
2 PRINT "OF A NUMBER BETWEEN 1 AND ANY LIMIT YOU WANT."
|
||||
3 PRINT "THEN YOU HAVE TO GUESS WHAT IT IS."
|
||||
4 PRINT
|
||||
5 PRINT "WHAT LIMIT DO YOU WANT";
|
||||
6 INPUT L
|
||||
7 PRINT
|
||||
8 L1=INT(LOG(L)/LOG(2))+1
|
||||
9 RANDOMIZE
|
||||
10 PRINT"I'M THINKING OF A NUMBER BETWEEN 1 AND"L
|
||||
11 G=1
|
||||
14 PRINT "NOW YOU TRY TO GUESS WHAT IT IS"
|
||||
15 M=INT(L*RND(0)+1)
|
||||
20 INPUT N
|
||||
21 IF N>0 THEN 25
|
||||
22 GOSUB70
|
||||
23 GOTO1
|
||||
25 IF N=M THEN 50
|
||||
30 G=G+1
|
||||
31 IF N>M THEN 40
|
||||
32 PRINT "TOO LOW. GUESS AGAIN."
|
||||
33 GOTO 20
|
||||
40 PRINT "TOO HIGH. GUESS AGAIN."
|
||||
42 GOTO 20
|
||||
50 PRINT "THAT'S IT! YOU GOT IT IN"G"TRIES."
|
||||
52 IF G<L1 THEN 58
|
||||
54 IF G=L1 THEN 60
|
||||
56 PRINT"YOU SHOULD HAVE BEEN ABLE TO GET IT IN ONLY"L1"."
|
||||
57 GOTO 65
|
||||
58 PRINT"VERY ";
|
||||
60 PRINT"GOOD!"
|
||||
65 GOSUB70
|
||||
66 GOTO10
|
||||
70 FOR H=1 TO 5
|
||||
71 PRINT
|
||||
72 NEXT H
|
||||
73 RETURN
|
||||
99 END
|
26
port/HILO.BAS
Normal file
26
port/HILO.BAS
Normal file
@ -0,0 +1,26 @@
|
||||
90 RANDOMIZE
|
||||
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)+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\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
|
37
port/KINEMA.BAS
Normal file
37
port/KINEMA.BAS
Normal file
@ -0,0 +1,37 @@
|
||||
90 RANDOMIZE
|
||||
100 PRINT
|
||||
105 PRINT
|
||||
106 Q=0
|
||||
110 V=5+INT(35*RND(0))
|
||||
111 PRINT "A BALL IS THROWN UPWARDS AT"V"METERS PER SECOND."
|
||||
112 PRINT
|
||||
115 A=V^2/19.6
|
||||
116 PRINT "HOW HIGH WILL IT GO (IN METERS)";
|
||||
117 GOSUB 500
|
||||
120 A=V/4.9
|
||||
122 PRINT "HOW LONG UNTIL IT RETURNS (IN SECONDS)";
|
||||
124 GOSUB 500
|
||||
130 T=1+INT(2*V*RND(1))/10
|
||||
132 A=V-9.8*T
|
||||
134 PRINT "WHAT WILL ITS VELOCITY BE AFTER"T"SECONDS";
|
||||
136 GOSUB 500
|
||||
140 PRINT
|
||||
150 PRINT Q"RIGHT OUT OF 3.";
|
||||
160 IF Q<2 THEN 100
|
||||
170 PRINT " NOT BAD."
|
||||
180 GOTO 100
|
||||
500 INPUT G
|
||||
501 G=100*ABS(G-A)
|
||||
502 IF G<=ABS(A) THEN 507
|
||||
503 IF G<=15*ABS(A) THEN 510
|
||||
504 PRINT "NOT EVEN CLOSE...."
|
||||
506 GOTO 512
|
||||
507 Q=Q+1
|
||||
508 PRINT "CORRECT! VERY GOOD!"
|
||||
509 GOTO 520
|
||||
510 PRINT "CLOSE ENOUGH."
|
||||
511 Q=Q+1
|
||||
512 PRINT "CORRECT ANSWER IS "A
|
||||
520 PRINT
|
||||
530 RETURN
|
||||
999 END
|
25
port/LETTER.BAS
Normal file
25
port/LETTER.BAS
Normal file
@ -0,0 +1,25 @@
|
||||
80 DIM A(6)
|
||||
90 RANDOMIZE
|
||||
100 PRINT "LETTER GUESSING GAME"\PRINT
|
||||
210 PRINT "I'LL THINK OF A LETTER OF THE ALPHABET, A TO Z."
|
||||
220 PRINT "TRY TO GUESS MY LETTER AND I'LL GIVE YOU CLUES"
|
||||
230 PRINT "AS TO HOW CLOSE YOU'RE GETTING TO MY LETTER."
|
||||
310 L=65+INT(RND(0)*26)
|
||||
320 G=0
|
||||
340 PRINT\PRINT "OK, I HAVE A LETTER. START GUESSING."
|
||||
410 PRINT\PRINT "WHAT IS YOUR GUESS";
|
||||
420 G=G+1
|
||||
430 LINPUT A$\CHANGE A$ TO A\A=A(1)\PRINT
|
||||
440 IF A=L THEN 500
|
||||
450 IF A>L THEN 480
|
||||
460 PRINT "TOO LOW. TRY A HIGHER LETTER."\GOTO 410
|
||||
480 PRINT "TOO HIGH. TRY A LOWER LETTER."\GOTO 410
|
||||
500 PRINT\PRINT "YOU GOT IT IN"G"GUESSES!!"
|
||||
504 IF G<=5 THEN 508
|
||||
506 PRINT "BUT IT SHOULDN'T TAKE MORE THAN 5 GUESSES!"\GOTO 515
|
||||
508 PRINT "GOOD JOB !!!!!"
|
||||
510 FOR N=1 TO 15\PRINT CHR$(7);\NEXT N
|
||||
515 PRINT
|
||||
520 PRINT "LET'S PLAY AGAIN....."
|
||||
530 GOTO 310
|
||||
999 END
|
31
port/NICOMA.BAS
Normal file
31
port/NICOMA.BAS
Normal file
@ -0,0 +1,31 @@
|
||||
10 PRINT "BOOMERANG PUZZLE FROM ARITHMETICA OF NICOMACHUS -- A.D. 90!"
|
||||
20 PRINT
|
||||
30 PRINT "PLEASE THINK OF A NUMBER BETWEEN 1 AND 100."
|
||||
40 PRINT "YOUR NUMBER DIVIDED BY 3 HAS A REMAINDER OF";
|
||||
45 INPUT A
|
||||
50 PRINT "YOUR NUMBER DIVIDED BY 5 HAS A REMAINDER OF";
|
||||
55 INPUT B
|
||||
60 PRINT "YOUR NUMBER DIVIDED BY 7 HAS A REMAINDER OF";
|
||||
65 INPUT C
|
||||
70 PRINT
|
||||
80 PRINT "LET ME THINK A MOMENT...."
|
||||
90 SLEEP(5)
|
||||
100 D=70*A+21*B+15*C
|
||||
110 IF D<=105 THEN 140
|
||||
120 D=D-105
|
||||
130 GOTO 110
|
||||
140 PRINT
|
||||
150 PRINT "YOUR NUMBER WAS"D", RIGHT";
|
||||
160 INPUT A$
|
||||
165 PRINT
|
||||
170 IF A$="YES" THEN 220
|
||||
180 IF A$="NO" THEN 240
|
||||
190 PRINT "EH? I DON'T UNDERSTAND '"A$"' TRY 'YES' OR 'NO'"
|
||||
200 GOTO 150
|
||||
220 PRINT "HOW ABOUT THAT!!"
|
||||
230 GOTO 250
|
||||
240 PRINT "I FEEL YOUR ARITHMETIC IS IN ERROR."
|
||||
250 PRINT
|
||||
260 PRINT "LET'S TRY ANOTHER."
|
||||
270 GOTO 20
|
||||
999 END
|
37
port/NUMBER.BAS
Normal file
37
port/NUMBER.BAS
Normal file
@ -0,0 +1,37 @@
|
||||
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
|
33
port/ROCKSP.BAS
Normal file
33
port/ROCKSP.BAS
Normal file
@ -0,0 +1,33 @@
|
||||
1 PRINT "THIS PROGRAM ALLOWS YOU TO PLAY THE OLD GAME OF"
|
||||
2 PRINT "ROCK, PAPER, AND SCISSORS AGAINST THE COMPUTER."
|
||||
5 RANDOMIZE
|
||||
6 PRINT "HOW MANY GAMES DO YOU WANT";\INPUT Q
|
||||
8 IF Q<11 THEN 11
|
||||
9 PRINT "SORRY, BUT WE AREN'T ALLOWED TO PLAY THAT MANY."\GOTO 6
|
||||
11 FOR G=1 TO Q
|
||||
15 PRINT\PRINT "GAME NUMBER"G
|
||||
20 X=INT(RND(1)*3+1)
|
||||
25 PRINT "3=ROCK...2=SCISSORS...1=PAPER"
|
||||
30 PRINT "1....2....3....WHAT'S YOUR CHOICE";\INPUT K
|
||||
32 IF (K-1)*(K-2)*(K-3)=0 THEN 35\PRINT "INVALID"\GOTO 25
|
||||
35 PRINT "THIS IS MY CHOICE..."
|
||||
40 ON X GOTO 50,60,70
|
||||
50 PRINT "...PAPER"\GOTO 80
|
||||
60 PRINT "...SCISSORS"\GOTO 80
|
||||
70 PRINT "...ROCK"
|
||||
80 IF X=K THEN 155
|
||||
85 IF X>K THEN 125
|
||||
90 IF X=1 THEN 105
|
||||
95 PRINT "YOU WIN!!!"\H=H+1\GOTO 160
|
||||
105 IF K=3 THEN 115\ GOTO 95
|
||||
115 PRINT "WOW! I WIN!!"\C=C+1\GOTO 160
|
||||
125 IF K<>1 THEN 115
|
||||
140 IF X<>3 THEN 115\GOTO 95
|
||||
155 PRINT "TIE GAME, NO WINNER."
|
||||
160 NEXT G
|
||||
170 PRINT\PRINT "HERE IS THE FINAL SCORE:"
|
||||
175 PRINT "I HAVE WON"C"GAME(S)."
|
||||
180 PRINT "YOU HAVE WON"H"GAME(S)."
|
||||
185 PRINT "AND"Q-(C+H)"GAME(S) ENDED IN A TIE."
|
||||
190 PRINT\PRINT "THANKS FOR PLAYING!!"
|
||||
200 END
|
21
port/RUSROU.BAS
Normal file
21
port/RUSROU.BAS
Normal file
@ -0,0 +1,21 @@
|
||||
5 RANDOMIZE
|
||||
8 PRINT "THIS IS A GAME OF >>>>>>>>>>>RUSSIAN ROULETTE."
|
||||
10 PRINT\PRINT "HERE IS A REVOLVER"
|
||||
20 PRINT "HIT '1' TO SPIN CHAMBER AND PULL TRIGGER."
|
||||
22 PRINT " (HIT '2' TO GIVE UP)"\PRINT "GO";
|
||||
25 N=0
|
||||
30 INPUT I
|
||||
31 IF I<>2 THEN 35
|
||||
32 PRINT " CHICKEN !!!"\GOTO 72
|
||||
35 N=N+1
|
||||
40 IF RND(0)>0.83333 THEN 70
|
||||
45 IF N>10 THEN 80
|
||||
50 PRINT "- CLICK -"
|
||||
60 PRINT\GOTO 30
|
||||
70 PRINT " BANG!!!! YOU'RE DEAD!"
|
||||
71 PRINT "CONDOLENCES WILL BE SENT TO YOUR RELATIVES."
|
||||
72 PRINT\PRINT\PRINT\PRINT "...NEXT VICTIM..."\GOTO 20
|
||||
80 PRINT "YOU WIN !!!"
|
||||
85 PRINT "LET SOMEONE ELSE BLOW HIS BRAINS OUT."
|
||||
90 GOTO 10
|
||||
99 END
|
Loading…
Reference in New Issue
Block a user