lundi 1 juin 2020

Randomly generating a number between a negative value and a positive value? [duplicate]

int number = rng.nextInt(10);

This generates a number between 0 to 10, but how do you make it -10 to 10?




Aucun commentaire:

Enregistrer un commentaire