Question: Write a Java program to generate 6 random lottery numbers. Your program should generate 5 numbers between 1 and 60. Use a for loop to

Write a Java program to generate 6 random lottery numbers. Your program should generate 5 numbers between 1 and 60. Use a for loop to control the 6 iterations. Output the numbers to the command line on a single line e.g.: 6 14 51 35 22 43. Write a Java program to accept positive integers from the user at the command line. The user can enter as many integers as they like. Use -1 as a sentinel. Keep track of the highest number (the max) they enter. When done output: "The max was X" where X is this highest integer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
