Question: Can you do it in Java? Thanks for your help - A lottery ticket is $4. - A ticket having 6 different numbers (from 1

 Can you do it in Java? Thanks for your help -A lottery ticket is $4. - A ticket having 6 different numbers Can you do it in Java? Thanks for your help

- A lottery ticket is $4. - A ticket having 6 different numbers (from 1 to 49) (Can be repeated) - On a Saturday, they draw the lottery, and the winning numbers are: 11,43,24,30,60,43 - Match at each position: - Match One or Two numbers to get a small prize. (\$10) - Match Three numbers to get a small prize. (\$100) - Matching Four numbers gets a bigger prize. (\$1000) - Matching Five is even bigger. (\$5000) - Matching ALL SIX of the numbers you might win millions. (\$5 million in cash) - In the example, we got matches at position 1, 3, 4, 6 (4 numbers) =$1000 - [Math Question] What is the possibility of you winning by matching all 6 numbers? - Homework Task: - Write a simple program allows you to buy a ticket with six random numbers, and generate the winning numbers and return what kind of prize you won (one game). - Bonus: imagine you buy up to 100,000 tickets, can you figure out if you actually profit or loss in a long run? mathsisfun.com/data/lottery.html Bramples of the Basic 649 Lottery Program Here is just an example of an implementation of 649 Lottery, you can try something different: - Generate a winning ticket with 6 numbers (from 1 to 49) - Generate a user ticket (either generate randomly or let them enter those numbers) - Try to find out how many numbers are the same. - Based on number of matches, calculate the reward money for the user

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!