Hi. I have come up with this for a random array generator for integers, but i can't seem to get to get it to work with floats. I changed some of the variables to floats but it didn't work. any ideas?
Code:#include <stdio.h> #include <stdlib.h> #include <time.h> int main () { int i; unsigned int iseed = (unsigned int)time(NULL); srand (iseed); for (i=0; i<5; i++) { printf ("rand[%d]= %u\n",i, rand ()); } return 0; }