Question: In Java Repetition statements or each person, the program should generate: o 3 numbers for the pick 3 lotto game o 4 numbers for the

In Java
Repetition statements
 In Java Repetition statements or each person, the program should generate:

or each person, the program should generate: o 3 numbers for the "pick 3" lotto game o 4 numbers for the "pick 4" lotto game and o 6 numbers for the "pick 6" lotto game . Each call to the method int r = rand . nextInt (9); will generate one lotto value between 0 and 9 (inclusive). : As the numbers are chosen, they should be displayed to the screen immediately. In order to format the output correctly, you will need to print a few blank spaces after the third and seventh number generated, as well as and new line character after the thirteenth number generated for each person. (HINT: How can you use a conditional statement to determine whether you have just completed printing the last Pick 3, Pick 4 or Pick 6 lottery number?) The output should have the following format: For how many people would you like to generate lottery numbers? 2 Your lucky lottery numbers for the day are: Pick 3 1 3 7 1 0 5 Pick 4 8 5 2 4 3 1 2 1 Pick 6 2 6 5 6 62 7 1 1 4 2 1 Test your program to be sure that it works properly. (Note the generated values will vary.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!