Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA Assignment Content Lucky Number Program: Write a program that generates lottery numbers for the user, saves them in a two-dimensional array, and then
IN JAVA
Assignment Content Lucky Number Program: Write a program that generates lottery numbers for the user, saves them in a two-dimensional array, and then displays the lottery ticket. Here are the requirements for your program; - Ask the user how many numbers (integers) they need (between 3 to 5) - Ask the user for the range for the numbers (0-99 or 0-10) - Setup and initialize a two-dimensional array that allows the user to request a maximum of 4 sets of numbers. - Use a random number generator (java.lang. Math.random()) method to generate the numbers the user requests - Save them in the array - If they have played less than 4 times, ask the user if they want to play again (request another set of numbers) and then start over with the request for numbers. - When the user is done, or if they choose the maximum sets of numbers, display a nicely formatted and labeled lottery ticket with their numbers on it, for exampleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started