vendredi 24 novembre 2017

Random number generation from a vector of numbers

I have a vector v = {1,5,4,2}. Now I want to write a function that returns a random pair of numbers from this vector. Example - {1,2},{4,4},{2,5},{5,1},{1,5},{2,2}....... I ant this pair to be generated in a random manner. Any idea how to implement this ?




Aucun commentaire:

Enregistrer un commentaire