mardi 16 juin 2015

Create a random set of 10 numbers from (-10 to 10) in C. Number should contain decimals

I would like to write a function that will generate a random set of numbers in c, from a negative range to a positive range. I would like those numbers to be decimal values, so float values would be great. I can create random numbers by positive means, but is there a way to do this with negative numbers and with decimals included? Thanks.




Aucun commentaire:

Enregistrer un commentaire