Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

83 Change management methods.

Answered: 1 week ago