mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-24 11:06:58 -05:00
99 lines
1.7 KiB
QBasic
99 lines
1.7 KiB
QBasic
|
5 PRINT "PROGRAM 'UGLY'"\PRINT
|
||
|
6 D=1\E=1\F=1\PRINT "DO YOU WANT CHANCE(1), OR SPECIAL(2)";
|
||
|
7 INPUT G
|
||
|
8 IF G=2 THEN 17
|
||
|
9 RANDOMIZE
|
||
|
10 A=INT(40*RND)+15
|
||
|
11 B=INT(40*RND)+10
|
||
|
12 C=INT(40*RND)+15
|
||
|
13 PRINT "A="A,"B="B,"C="C
|
||
|
14 PRINT "DO YOU STILL WANT CHANCE -- 1 FOR YES, 2 FOR NO";
|
||
|
15 INPUT H
|
||
|
16 ON H GOTO 19, 6
|
||
|
17 PRINT "WHAT ARE YOUR VALUES FOR A, B, AND C";
|
||
|
18 INPUT A,B,C
|
||
|
19 PRINT\PRINT\PRINT TAB(20)"XXX"
|
||
|
20 PRINT TAB(19)"XXXXX"
|
||
|
25 PRINT TAB(20)"XXX"
|
||
|
30 PRINT TAB(21)"X"
|
||
|
35 PRINT TAB(15)"X";
|
||
|
40 D=D+1
|
||
|
45 PRINT "X";
|
||
|
50 IF D>=A-2 THEN 60
|
||
|
55 GOTO 40
|
||
|
60 PRINT "X"
|
||
|
65 PRINT TAB(15)"X";
|
||
|
70 D=1
|
||
|
75 D=D+1
|
||
|
80 PRINT "X";
|
||
|
85 IF D=A-1 THEN 95
|
||
|
90 GOTO 75
|
||
|
95 PRINT "X)."
|
||
|
100 PRINT TAB(15)"X";
|
||
|
105 D=1
|
||
|
110 D=D+1
|
||
|
115 PRINT "X";
|
||
|
120 IF D>=A-2 THEN 130
|
||
|
125 GOTO 110
|
||
|
130 PRINT "X"
|
||
|
135 PRINT TAB(15)"X";
|
||
|
140 E=E+1
|
||
|
150 PRINT "X";
|
||
|
155 IF E=B-1 THEN 165
|
||
|
160 GOTO 140
|
||
|
165 PRINT "X"
|
||
|
170 PRINT TAB(15)"X";
|
||
|
175 E=1
|
||
|
180 E=E+1
|
||
|
185 PRINT "X";
|
||
|
190 IF E=B-1 THEN 205
|
||
|
200 GOTO 180
|
||
|
205 PRINT "X"
|
||
|
210 PRINT TAB (15)"X";
|
||
|
215 E=1
|
||
|
220 E=E+1
|
||
|
225 PRINT "X";
|
||
|
230 IF E=B-1 THEN 240
|
||
|
235 GOTO 220
|
||
|
240 PRINT "X"
|
||
|
245 PRINT TAB(15)"X";
|
||
|
250 F=F+1
|
||
|
255 PRINT "X";
|
||
|
260 IF F>=C-2 THEN 270
|
||
|
265 GOTO 250
|
||
|
270 PRINT "X"
|
||
|
275 PRINT TAB(15)"X";
|
||
|
280 F=1
|
||
|
285 F=F+1
|
||
|
290 PRINT "X";
|
||
|
295 IF F=C-1 THEN 305
|
||
|
300 GOTO 285
|
||
|
305 PRINT "X"
|
||
|
310 PRINT TAB(15)"X";
|
||
|
315 F=1
|
||
|
316 GOTO 320
|
||
|
317 F=F+3
|
||
|
320 F=F+1
|
||
|
325 PRINT "X";
|
||
|
327 IF F=7 THEN 329
|
||
|
328 GOTO 331
|
||
|
329 PRINT "()";
|
||
|
330 GOTO 317
|
||
|
331 IF F=C-1 THEN 340
|
||
|
335 GOTO 320
|
||
|
340 PRINT "X"
|
||
|
345 PRINT TAB(19)"XX XX"
|
||
|
350 PRINT TAB(18)"XX XX"
|
||
|
355 PRINT TAB(17)"XX XX"
|
||
|
360 PRINT TAB(16)"XX XX"
|
||
|
365 PRINT TAB(15)"XX XX"
|
||
|
370 PRINT TAB(13)"XXXX XXXX"
|
||
|
380 PRINT\PRINT
|
||
|
385 IF B<A THEN 6
|
||
|
395 FOR X=1 TO 48
|
||
|
400 PRINT "UGLY! ";
|
||
|
405 NEXT X
|
||
|
407 PRINT\PRINT
|
||
|
410 GOTO 6
|
||
|
415 END
|