Question: using the template below write a program in java using Math.random() and Math.ceil() to generate a series of four random numbers within a range from

using the template below write a program in java using Math.random() and Math.ceil() to generate a series of four random numbers within a range from 1 to 99 which can be used as selections in a lottery numbers of that range.

/******************* Name:

Date:

Notes: *******************/

public class LottoWinner { public static void main(String[] args) { int[] while () { int n = (int) Math.ceil(Math.random() * 99); if(a[0] == 0) a[0] = n; else if else if.

else if } System.out.print("Winning Numbers are: "); for(int i = 0; i < 4; i++) { System.out.print } }

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!