Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array Using Random Number Generatoe

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to make an array of 100 random numbers. I do not know off hand what the random number generator call is. Can anyone assist me in this?

Thanks,

WZiggy
 
From ANSI C standard:
call:
int a=rand();
to get pseudo-random integetrs from 0 to RAND_MAX
RAND_MAX shall be at list 32767.
call:
srand(unsiggned int seed);
to set new sequence of pseudo-random numbers (better use before calling rand();).
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top