Generate random number for lottery( Mega Millions) using Java....

Publicado el: 12 octubre 2019
en el canal de: Badri Khanal
362
9

In this video tutorial, we have developed code to generate random number for lotteries. We have taken a popular lottery Mega Millions as an example. And have developed java code in the format of Mega Millions. That is total 6 lucky numbers from 5 random numbers in the range 1 to 70 and 1 mega ball number in the range 1 to 25.
Correction: The maximum limit should be 71 to generate
random numbers from 0 to 70. So, the code should be :
For the first 5 numbers:
int first_5_Numbers = winningNumber.nextInt(71);
Similarly, for Mega Ball number :
The maximum limit should be 26 to generate
random numbers from 0 to 25. So, the code should be :
int sixth_Numbers = winningNumber.nextInt(26);


En esta página del sitio puede ver el video en línea Generate random number for lottery( Mega Millions) using Java.... de Duración hora minuto segunda en buena calidad , que subió el usuario Badri Khanal 12 octubre 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 362 veces y le gustó 9 a los espectadores. Disfruta viendo!