0

I using this code to generate two digit but I want to change it and make it generate three digit.

int lottery = (int)(Math.random() * 100);

Thanks

Obaidi
  • 1
  • 3

1 Answers1

0

You only have to change the multiplication from 100 to 1000 :)

int lottery = (int)(Math.random() * 1000);
Lungu Daniel
  • 816
  • 2
  • 8
  • 15