# random(seed,n) -- generate n lines of random numbers, twice
#
# results should be the same on all architectures if the seed is not zero.

resource r ()
    real s = 1.0
    int n = 10
    getarg (1, s)
    getarg (2, n)
    seed (s)
    for [ i = 1 to n ] {
	printf ("%10.5f", random())
	printf ("%12.2f", random(1000))
	printf ("%12.1f\n", random (1200,1300))
	}
    write ("----")
    seed (s)
    for [ i = 1 to n ] {
	printf ("%10.5f", random())
	printf ("%12.2f", random(1000))
	printf ("%12.1f\n", random (1200,1300))
	}
end
