Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java programming Your assignment in problem 1 is to write a Java program that lets you select six lottery numbers. To simplify this first version,
java programming
Your assignment in problem 1 is to write a Java program that lets you select six lottery numbers. To simplify this first version, you can accept any six values including duplicates. Your program must have the following elements: Create a class named Lottery1 .Use a loop to continue prompting for the six integers. Exit when all six values have been captured. Use an array to store the six int values. After populating the array, use a loop to print out each of the values. .Perform everything within the main method. SAMPLE OUTPUT: java Lottery1 Enter a number from 1-54 (pick #1): 12 Enter a number from 1-54 (pick #2): 60 Enter a number from 1-54 (pick #3): 12 Enter a number from 1-54 (pick #4): 26 Enter a number from 1-54 (pick #5): 15 Enter a number from 1-54 (pick #6): 9 Playing the following six numbers: 12 60 12 26159Step 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