      program snrnd
C
C     sample program for nrnd
C     sgenrand -> initialization func. of genrand
C
      integer seed
      real*8 genrand, nrnd
      external genrand
      integer i, itrial
     
      read(5,*) seed, itrial
      call sgenrand(seed)

      do 10 i = 1, itrial
         w = nrnd(genrand)
 1000    format(E20.6)
         write(6, 1000) w
 10   continue

      stop
      end
