I am making a program that has a bunch of embedded if statements. I need random number that are between 0 and 1. In order to get really "random" numbers, I set up the program to get the seed from the cpu time. Then, to get the number between 0 and 1 I was planning to divide by the greatest possible random number from the random() function, but I can't figure out what it is. It is somewhere in the neighborhood of 300000000 ( I just guessed to get that).
melissa.johns 12 Newbie Poster
melissa.johns 12 Newbie Poster
Dave Sinkula 2,398 long time no c Team Colleague
melissa.johns 12 Newbie 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.