Question: This is for java begginers and must use the following format. AND the numbers MUST be stored in an array and use the array the

This is for java begginers and must use the following format. AND the numbers MUST be stored in an array and use the array the complete it.
Public static void main
Public static...
Public static ...
.
.
.
 This is for java begginers and must use the following format.
AND the numbers MUST be stored in an array and use the

Write a program to simulate a lottery game. Generate a random 10 digit number and then prompt the user to enter a 10 digit number. Both numbers should be stored in an array where each element of the array is one digit of the number. The total jackpot is $100,000. You should compare the user's guess to the randomly generated lottery number and give the user a percentage of the winnings based on how many digits they guessed correctly For example: if the winning number is 5936577294 and the user guesses 5473077294 they would get 60% of the winnings since they guessed 6/ 10 numbers correctly. A digit in the user's number is correct if it matches the corresponding number in the same digit position as the winning number NOTE: To get credit for this problem you must store each number in an array as described above, and use these arrays to complete the assignment. Sample Output Enter a 10 digit lottery number: 5473077294 Winning Number 0 4 5 618074 7 User Guess: 5 473 07 729 4 You mes sed1/10 pumhere correct1

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!