-
Notifications
You must be signed in to change notification settings - Fork 0
/
MADLIBS.BAS
166 lines (164 loc) · 6.88 KB
/
MADLIBS.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
3 CLEAR 5000
5 PRINT CHR$(26):WIDTH 80
10 PRINT TAB(33);"MADLIB":PRINT
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
25 PRINT: PRINT: PRINT
27 DIM A$(11),B$(5),C$(10)
30 PRINT "O.K. WE'RE GOING TO WRITE SOME MAD-LIB STORIES"
40 PRINT "TOGETHER. YOU SUPPLY THE WORDS, I SUPPLY THE PLOT.": PRINT
60 PRINT "FIRST I NEED 11 ADJECTIVES. ADJECTIVES MODIFY"
70 PRINT "A NOUN, E.G., RED, DIRTY, LARGE, ETC."
80 FOR I=1 TO 11: INPUT A$(I): NEXT I
90 PRINT "NOW I NEED 5 ADVERBS. THEY MODIFY VERBS"
100 PRINT "AND END IN 'LY' (SLOWLY, GREEDILY, ETC.)"
110 FOR I=1 TO 5: INPUT B$(I): NEXT I
120 PRINT:PRINT "OK, NOW 10 NOUNS, E.G., TELETYPE, INSECT, COAT, ETC."
130 FOR I=1 TO 10: INPUT C$(I): NEXT I
140 PRINT: INPUT "HOW ABOUT TWO FIRST NAMES OF MEN";D$,E$
160 INPUT "THE FIRST NAME OF A GIRL";F$
170 INPUT "AND SOMEONE'S LAST NAME";G$
180 INPUT "A GEOGRAPHICAL LOCATION";H$
190 INPUT "A LIQUID";I$
200 INPUT "AND FINALLY, AN EXCLAMATORY WORD OR TWO";J$: PRINT
220 PRINT "VERY GOOD! WOULD YOU LIKE A NEWSPAPER AD (1),"
230 PRINT "A WESTERN (2), A STORY ABOUT THE ARMY (3), OR"
240 INPUT "A WATERBED (4). WHICH ONE, 1, 2, 3, OR 4";N: PRINT
250 IF N>0 AND N<5 THEN 270
260 INPUT "COME ON NOW -- 1, 2, 3, OR 4";N: GOTO 250
270 PRINT CHR$(26): ON N GOTO 300,400,500,600
300 PRINT TAB(25);"DAILY GRUNT CLASSIFIEDS": PRINT
310 PRINT "FOR SALE: 1957 SEDAN. THIS "A$(1)" CAR IS IN "A$(2)
320 PRINT "CONDITION. IT WAS FORMERLY OWNED BY A "A$(3)" SCHOOL"
330 PRINT "TEACHER WHO ALWAYS DROVE IT "B$(1)". THERE IS A "A$(4)
340 PRINT C$(1)" IN THE BACK SEAT. IT HAS A CHROME "C$(2)" ON THE HOOD,"
350 PRINT "A "A$(5)" PAINT JOB, "A$(6)" TIRES AND THE BACK OPENS INTO"
360 PRINT "A "A$(7)" "C$(3)". WILL CONSIDER TAKING A SLIGHTLY USED"
370 PRINT C$(4)" IN TRADE."
380 PRINT: PRINT: PRINT "LOST: IN THE VICINITY OF "H$", A "A$(8)
390 PRINT "FRENCH POODLE WITH "A$(9)" HAIR AND A "A$(10)" TAIL. IT"
392 PRINT "ANSWERS TO THE NAME OF "F$". WHEN LAST SEEN IT WAS CARRYING"
394 PRINT "A "C$(5)" IN ITS MOUTH. A "A$(11)" REWARD IS OFFERED."
396 GOTO 700
400 PRINT TAB(25);"AN ADULT WESTERN": PRINT
410 PRINT "TEX "G$", THE MARSHALL OF "D$" CITY RODE INTO TOWN. HE"
420 PRINT "SAT "B$(2)" IN THE SADDLE, READY FOR TROUBLE. HE KNEW THAT"
430 PRINT "HIS "A$(1)" ENEMY, "E$" THE KID WAS IN TOWN. THE KID WAS"
440 PRINT "IN LOVE WITH TEX'S HORSE, "F$". SUDDENLY THE KID CAME OUT"
450 PRINT "OF THE "A$(7)" NUGGET SALOON.": PRINT
460 PRINT "'DRAW TEX,' HE YELLED "B$(3)".": PRINT
470 PRINT "TEX REACHED FOR HIS "C$(4)", BUT BEFORE HE COULD GET IT"
475 PRINT "OUT OF HIS "C$(5)" THE KID FIRED, HITTING TEXT IN THE "C$(6)
480 PRINT "AND THE "C$(7)".": PRINT
485 PRINT "AS TEX FELL HE PULLED OUT HIS OWN "C$(8)" AND SHOT THE KID"
490 PRINT INT(50*RND(1)+3)"TIMES IN THE "C$(9)". THE KID DROPPED IN"
492 PRINT "A POOL OF "I$".":PRINT:PRINT"'"J$"' TEX SAID, 'I HATED TO"
494 PRINT "DO IT BUT HE WAS ON THE WRONG SIDE OF THE "C$(10)".'":PRINT
496 GOTO 700
500 PRINT "IF YOU PLAN ON JOINING THE ARMY, HERE ARE SOME "A$(11)
510 PRINT "HINTS THAT WILL HELP YOU BECOME A "A$(10)" SOLDIER.":PRINT
520 PRINT "THE ARMY IS MADE UP OF OFFICERS, NON-COMS, AND "C$(1)"S."
530 PRINT "YOU CAN RECOGNIZE AN OFFICER BY THE "C$(2)" ON HIS"
540 PRINT "SHOULDERS AND THE FUNNY-LOOKING "C$(3)"S ON HIS CAP."
550 PRINT "WHEN YOU ADDRESS AN OFFICER, ALWAYS SAY "C$(4)" AND SAY IT"
555 PRINT B$(5)". IF YOU GET A "A$(9)" HAIRCUT, KEEP YOUR "C$(5)"S"
560 PRINT "SHINED, AND SEE THAT YOUR "C$(6)" IS CLEAN AT ALL TIMES,"
565 PRINT "YOU WILL BE A CREDIT TO THE SLOGAN:":PRINT
570 PRINT " THE ARMY BUILDS BETTER "C$(7)"S!":PRINT
575 PRINT "AT ROLL CALL, WHEN THE "A$(8)" SERGEANT CALLS YOUR NAME,"
580 PRINT "SHOUT '"J$"' LOUD AND CLEAR.":PRINT
585 PRINT "YOU WILL BECOME FAMILIAR WITH WEAPONS LIKE THE .30 CALIBRE"
590 PRINT C$(8)" AND THE AUTOMATIC "C$(9)".":PRINT
592 PRINT "FOLLOW THIS ADVICE AND YOU MAY WIN THE....."
595 PRINT "********** "A$(7)" CONDUCT "C$(10)" **********": GOTO 700
600 PRINT"BUST-A-BUTTON AND DUCK DEPT STORE":PRINT"DIX HILLS, NEW YORK"
610 PRINT: PRINT "DEAR SIRS:": PRINT
620 PRINT "LAST WEEK I PURCHASED A "A$(2)" CONTOUR WATER BED IN YOUR"
630 PRINT "STORE. I GOT IT ESPECIALLY FOR MY "A$(4)" HUSBAND WHO"
640 PRINT "SLEEPS VERY "B$(1)" AND SAYS THAT "A$(6)" WATER BEDS THAT"
650 PRINT "HAVE "C$(1)"S IN THEM MAKE HIS "C$(3)" ACHE. WHEN THE BED"
655 PRINT "ARRIVED MY HUSBAND TESTED IT "B$(2)" AND SAID THE "A$(8)
660 PRINT C$(5)" WAS BENT AND KEPT PRESSING INTO HIS "C$(6)". HE SAYS"
665 PRINT "THIS COULD LEAD TO A "A$(10)" CONDITION OF THE "C$(8)".9*Z
815 H1=R1*Z
820 D=R0*A*Z
825 D1=R*A1*Z
830 T2=M1*B/M0
835 PRINT USING "##,##";T;:PRINT TAB(9);:PRINT USING "#####,###";H;:
PRINT TAB(20);D;
840 PRINT TAB(37);:PRINT USING "##,####.#";H1;:PRINT TAB(48);:
PRINT USING "##,####.#";D1;:PRINT TAB(60);:PRINT USING " ###";T2
845 IF H0<3.28783E-04 THEN 880
850 IF R0*A>164.474 THEN 1050
855 IF M1>0 THEN 580
860 T1=20
865 F=0
870 P=0
875 GOTO 620
880 IF R1<-8.21957E-04 THEN 1020
885 IF ABS(R*A1)>4.93174E-04 THEN 1020
890 IF H0<-3.28783E-04 THEN 1020
895 IF ABS(D)>10*Z THEN 1065
900 GOTO 995
905 PRINT
910 PRINT "THIS SPACECRAFT IS NOT ABLE TO VIOLATE THE SPACE-";
915 PRINT "TIME CONTINUUM."
920 GOTO 575
925 PRINT
930 PRINT "IF YOU WANT TO SPIN AROUND, GO OUTSIDE THE MODULE"
935 PRINT "FOR AN E.V.A."
940 GOTO 575
945 PRINT
950 PRINT "IMPOSSIBLE THRUST VALUE ";
955 IF F<0 THEN 985
960 IF F-.05<.05 THEN 975
965 PRINT "TOO LARGE"
970 GOTO 575
975 PRINT "TOO SMALL"
980 GOTO 575
985 PRINT "NEGATIVE"
990 GOTO 575
995 PRINT
1000 PRINT "TRANQUILITY BASE HERE -- THE EAGLE HAS LANDED."
1005 PRINT "CONGRATULATIONS -- THERE WAS NO SPACECRAFT DAMAGE."
1010 PRINT "YOU MAY NOW PROCEED WITH SURFACE EXPLORATION."
1015 GOTO 1100
1020 PRINT
1025 PRINT "CRASH !!!!!!!!!!!!!!!!"
1030 PRINT "YOUR IMPACT CREATED A CRATER";ABS(H);M$;" DEEP."
1035 X1=SQR(D1*D1+H1*H1)*G3
1040 PRINT "AT CONTACT YOU WERE TRAVELING";X1;N$;"/HR."
1045 GOTO 1100
1050 PRINT
1055 PRINT "YOU HAVE BEEN LOST IN SPACE WITH NO HOPE OF RECOVERY."
1060 GOTO 1100
1065 PRINT "YOU ARE DOWN SAFELY - "
1075 PRINT
1080 PRINT "BUT MISSED THE LANDING SITE BY";ABS(D/G5);N$;"."
1085 GOTO 1100
1090 PRINT
1095 PRINT "MISSION ABENDED"
1100 PRINT
1105 PRINT "DO YOU WANT TO TRY IT AGAIN ";
1110 INPUT Z$
1115 IF LEFT$(Z$,1)="Y" THEN 20
1120 IF LEFT$(Z$,1)="N" THEN 1130
1125 GOTO 1105
1130 PRINT
1135 PRINT "TOO BAD, THE SPACE PROGRAM HATES TO LOSE EXPERIENCED"
1140 PRINT "ASTRONAUTS."
1145 RUN "MENU"
1150 PRINT
1155 PRINT "OK, DO YOU WANT THE COMPLETE INSTRUCTIONS OR THE INPUT -"
1160 PRINT "OUTPUT STATEMENTS?"
1165 PRINT "1=COMPLETE INSTRUCTIONS"
1170 PRINT "2=INPUT-OUTPUT STATEMENTS"
1175 PRINT "3=NEITHER"
1180 INPUT B1
1185 Q$="NO"
1190 IF B1=1 THEN 205
1195 Q$="YES"
1200 IF B1=2 THEN 190
1205 IF B1=3 THEN 190
1210 GOTO 1165
1215 RUN "MENU"