vendredi 3 mars 2017

How to generate random number where both boundaries are inclusive

i was trying to generate an random integer between 200 and 300 i used the following code :

              int y =(int)((Math.random()*200)+300)




Aucun commentaire:

Enregistrer un commentaire