I want to generate random numbers between 1500 and 3000. Is there a way to do this using either of the following random number generating code examples?
Much appreciated.
Code:srand( (unsigned)time( NULL ) ); printf( " %d\n", rand() );Code:random_number = (int) (3000.0*rand()/(RAND_MAX));