Hello I'm trying to get a random float number between two float numbers using rand() function but I couldn't write it by myself, can you show me how to do it? Thanks...
newbiecoder
0
Junior Poster in Training
Recommended Answers
Jump to PostTry something like this:
x = low_number + (high_number - low_number) * (rand() / RAND_MAX) / 2.0;
If you need more help, follow the policy of this forum, by writing some code yourself, and do not continue to ask for help without showing any effort on your …
All 4 Replies
UncleLeroy
49
Junior Poster in Training
glutisnotasin
0
Newbie Poster
mrnutty
761
Senior Poster
arkoenig
340
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.