home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / USCX / UTIL-ETC.ZIP / RANDOM.BAS < prev    next >
BASIC Source File  |  1985-06-16  |  272b  |  12 lines

  1. 10   INPUT "NUMBER OF BITS";BITS
  2. 20   INPUT "SEEDS";A,B
  3. 30   MAX=2^BITS-1
  4. 40   A=2*A:B=2*B
  5. 50   IF A>MAX THEN A = A-MAX
  6. 60   IF B>MAX THEN B=B-MAX
  7. 70   C = A+B:IF C>MAX THEN C = C-(MAX+1)
  8. 80   C=2*C:IF C>MAX THEN C=C-MAX
  9. 90   PRINT C
  10. 100  A=B:B=C
  11. 110  GOTO 70
  12.