Hi, this is my first post...great site...i want to ask sth...i made a small program but i have a problem. when we call rand() we get a number betwen 0 and RAND_MAX. I want to have numbers betwwen 0 and 1. Does anyone know how can i do this? The problem is:
#...
#...
main(){
int x;
srand(5);
x = rand();
x = rand()/RAND_MAX; //output is always 0...