lundi 2 janvier 2017

Generate random number in same range for multiple varaibles

I am trying to find out how to generate a random number in the same range for multiple variables easily instead of typing out the same thing many times.

For example:

num1 = rnd.Next(1, 10);
num2 = rnd.Next(1, 10);

Is there a more simple way to do that in a single line?




Aucun commentaire:

Enregistrer un commentaire