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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started