home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
MEGA-BUCKS
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
768b
|
28 lines
10 REM MEGA-BUCKS
11 REM OK FOR NON-COMMERCIAL DISTRIBUTION
12 POKE53280,0:POKE53281,0:PRINT"[159]"
20 REM WRITTEN: 19-SEP-84 B. HAMMOND
30 PRINT "[147]":PRINTSPC(7);"M E G A - B U C K S":PRINT
40 DIM A(6):REM SET UP THE RANDOM NUMBER ARRAY
50 INPUT "HOW MANY NUMBERS WOULD YOU LIKE";N:PRINT
60 FOR Z=1 TO N
70 FOR X=1 TO 6:REM GENERATE 6 RANDOM NUMBERS AND PUT THEM IN A(X)
80 LET A(X)=INT(RND(1)*35)+1
90 NEXT X
100 REM NOW WE SORT THEM ALL OUT
110 FOR B=1 TO 6
120 FOR C=B TO 6:REM MAY HAVE TO CHANGE END VALUES
130 IF A(B)<=A(C) GOTO 150
140 D=A(B):A(B)=A(C):A(C)=D
150 NEXT C
160 NEXT B
170 REM CHECK FOR A REPEAT
180 FOR X=1 TO 5
190 IF A(X)=A(X+1) THEN 70
200 NEXT X
210 REM TELL THE WORLD...
220 FOR X=1 TO 6:PRINT A(X);:NEXT X
230 PRINT
240 NEXT Z
250 END