Link to home
Start Free TrialLog in
Avatar of lost_bits1110
lost_bits1110

asked on

How to generate random FLOAT numbers between a specified range?

Hello experts..!

How can I generate random float numbers in a particular range?

I know I can use: (float)rand()

But how could I get numbers between the ranges -5 and 20 lets say?

Thanks..
ASKER CERTIFIED SOLUTION
Avatar of Dexstar
Dexstar

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
Avatar of lost_bits1110
lost_bits1110

ASKER

Thaaaaaaaaaaaanx..!
It works..
How'd you figure that out so fast?????!
I'll get there one day.......
:s
> How'd you figure that out so fast?????!

Practice!  :)

Dex*