Usually people think that only a lucky can win the lottery, but for an ordinary person a whole life is not enough to find that lucky ticket. Fortunately, now you don't have to wait a lifetime to try your luck, because now there is the LottoApp!
LottoApp is a Java application that calculates the time to find a random lottery ticket that matches the user's ticket, provided that the user would buy one ticket per week.
To use the application, just run the Lotto file in the terminal. At startup, the program asks the user to enter 7 unique numbers from 1 to 40.
When entering an incorrect number or symbol, the program asks to enter the number again.
When 7 numbers are entered, the program starts looking for random tickets with matching numbers.
The time spent on the search is considered, at the rate of one ticket per week.
The program has the ability to change the number of digits in the lottery ticket (default 7) and the range of acceptable values in the ticket (default 40). To do this, you need to change the value of the variables (ArraySize and ArrayMax) in the Lotto class.