/*******

The purpose of this program is
to print a short table of random
numbers using the uniform distribution in
uni.c. The random numbers are uniformly distributed
in the interval [0,1].

Compile like this:

   gcc r1.c uni.c

The file uni.c contains the random number 
generator: the functions uni, ustart, and unib.

******/

#include <stdio.h>
#include <stdlib.h>

double uni (void);               /* the random number generator */
double ustart (long iseed);      /* defines the seed */

main()
{

    double u, useed; 
    int i;
    long iseed;
    iseed = 305 ;
    useed = ustart(iseed);

    printf("\n");

    for( i = 1; i <= 10; i++ ){

      u = uni();
      printf("%5d:\t%f\n", i, u );

    }

    printf("\n");
  }
