What's new

Closed Lotto random numbers please help , i am a computer engineering student (first year this year :-))

Status
Not open for further replies.

yankumi

Enthusiast
Joined
Oct 13, 2019
Posts
1
Reaction
0
Points
62
Hi Pwede po bang magpahelp sa paggenerate ng lotto numbers in java?
FILLING OF LOTTO OR VIKING LOTTO.

In this assignment you will create a program that prints a number of lines. Each line must contain the number of numbers that can be used to fill out a LOTTO or VIKING LOTO voucher. The solution is delivered as a complete program, the task is divided into points a) to f) to facilitate the overview of what is to be done. The necessary parameters for the methods / functions you create, you have to decide for yourself. No global variables should be used.

a. Largest numbers in LOTTO are 34 and number is 7, largest number in VIKING LOTTO is 48 but here number is 6. Lowest number is 1 in both. The program should declare a table x with as many integers as needed for a row. The table x must be declared in main, ie not global. The program must ask the user whether to generate it for LOTTO or VIKING LOTTO.

b. Create the int readInn () method that asks the user how many rows to generate and return this number.

c. Create the void feature () method that will fill table x with as many different numbers as from 1 and even 34 for LOTTO, from 1 and even 48 for VIKING LOTTO. To extract a number, use the random method / function in Java.

d. Create the printUt () method, which prints the x table on a line and changes the line by the last number.

e. Create main, this is called lesInn (). We then go in loop as many times as we should have out ranks. In the loop we call:


1. Subtract () / * which fills table x with different numbers. * / 2. printUt () / * which prints the table * /

f. Expansion: Create a method void sorter () that sorts the numbers in Table x so smallest numbers come first. This function is called from the main before the write () function. Use Bubble Black as a sorting method.


TIP: When you drag a number, you should go through table x to see if the number is there before. If you find it difficult to treat both LOTTO and VIKING LOTTO, do the job first for LOTTO and see what needs to be changed to adapt to VIKING LOTTO.

Salamat po in advance
 
Last edited:
sabihin mo nalang sa cashier lucky pick sila na pipili ng numbers para sayo,,
congrats nga pala sa new millionaire 244,000,000 jackpot
 
Status
Not open for further replies.

Similar threads

Back
Top