How do I use srand and rand to generate random number between -0.5 and +0.5?
srand
rand
srand( (signed)time( NULL ) ); double z = (float) rand()/RAND_MAX;
What changes should I make in the above code?
Aucun commentaire:
Enregistrer un commentaire