Random Numbers
Steve Lamont
lamonts at Sds.Sdsc.EDU
Thu Feb 11 00:33:57 AEST 1988
BECMUG Guests <becmug at ernie.Berkeley.EDU> says
> I've just learned C, and am thinking of good ways to generate random
> numbers. Does anyone have any suggestions?
Try the function rand(). For example:
...
int rand_no;
rand_no = rand();
...
spl
----------------------------------------
Internet: LAMONTS at SDS.SDSC.EDU
Bitnet: LAMONTS at SDSC
Span: SDSC::LAMONTS (27.1)
USPS: Steve Lamont
San Diego Supercomputer Center
P.O. Box 85608
San Diego, CA 92138
AT&T: 619.534.5126
More information about the Comp.lang.c
mailing list