question archive Write a Java program to generate 6 random lottery numbers

Write a Java program to generate 6 random lottery numbers

Subject:Computer SciencePrice: Bought3

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.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE