Hi . I would like to ask is there a way to generate a random natural number which is a multiple of a specific factor n?
For example:
int factor = 3;
NaturalGenerator naturalGenerator = JRand.natural();
naturalGenerator.min(0);
naturalGenerator.max(999);
//do something with factor
int randomMultiple = naturalGenerator.gen();
Hi . I would like to ask is there a way to generate a random natural number which is a multiple of a specific factor n?
For example: