Program

c    	   A very simple random number generator
c
      PROGRAM random
      IMPLICIT none
c
c         declarations
       INTEGER i, number, old, seed, x, y
c 
c	  set parameters (seed for generator, number of generated numbers)
       seed = 11
       number = 1000
c
c	  open output file, seed number generator
       OPEN(6, FILE='rangenf.dat')
       old = seed
c
c	  execution 
      DO 10 i = 1, number
         x = MOD((57*old+1), 256)
         y = MOD((57*x+1), 256)
         WRITE (6,*) x, y
         old=y 
 10   CONTINUE
c
      STOP 
      END

A source code which you can save and run on your computer.
Back to main document.