M
mdh
Hi Group,
Followed the faq to generate random numbers within a given range, so
used this:
# include <stdlib.h>
# define ULIMIT 100
int(........)
intarr= ( rand()/(RAND_MAX/ULIMIT+1));
Perhaps I have not run the function enough, but each time, intarr[0]
equals 0. The subsequent numbers are "random" or "psuedo-random" as I
would expect, but I cannot explain element '0'. Have I just not run it
enough? Or is there another explanation.
Thanks in advance.
Followed the faq to generate random numbers within a given range, so
used this:
# include <stdlib.h>
# define ULIMIT 100
int(........)
intarr= ( rand()/(RAND_MAX/ULIMIT+1));
Perhaps I have not run the function enough, but each time, intarr[0]
equals 0. The subsequent numbers are "random" or "psuedo-random" as I
would expect, but I cannot explain element '0'. Have I just not run it
enough? Or is there another explanation.
Thanks in advance.