Link to home
Start Free TrialLog in
Avatar of gjgomez
gjgomez

asked on

generating random numbers between a desired interval

Hello experts.
I would like to know how I can generate random numbers in the interval between 1 and 100. I don't want 0 to be included.
I tried using rand() with time(0) and then doing the %100. But with this process the 0 is included.
Any way so that the 0 is not included?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of nonubik
nonubik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial