home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
UTIL-ETC.ZIP
/
RANDOM.BAS
< prev
next >
Wrap
BASIC Source File
|
1985-06-16
|
272b
|
12 lines
10 INPUT "NUMBER OF BITS";BITS
20 INPUT "SEEDS";A,B
30 MAX=2^BITS-1
40 A=2*A:B=2*B
50 IF A>MAX THEN A = A-MAX
60 IF B>MAX THEN B=B-MAX
70 C = A+B:IF C>MAX THEN C = C-(MAX+1)
80 C=2*C:IF C>MAX THEN C=C-MAX
90 PRINT C
100 A=B:B=C
110 GOTO 70