randpint.c - random positive integer operations
Version Tag $Id: randpint.c,v 1.16 2006/02/06 19:55:46 db60 Exp $
long randpint(long upper);
Returns a positive integer with a user-specified upper limit.
Before calling randpint()
, ensure the random number generator has
been initialized by calling rinit()
.
The random number will be in the range [0..upper
] inclusive.
A random integer in the interval [0..upper
].