Create a lottery game application. Generate three random numbers, each between 0 and 9. Allow the user

Question:

Create a lottery game application. Generate three random numbers, each between 0 and 9. Allow the user to guess three numbers. Compare each of the user€™s guesses to the three random numbers and display a message that includes the user€™s guess, the randomly determined three-digit number, and the amount of money the user has won as follows:

Award ($) Matching Numbers Any one matching 10 Two matching 100 1,000 Three matching, not in order Three matching in exa

Make certain that your application accommodates repeating digits. For example, if a user guesses 1, 2, and 3, and the randomly generated digits are 1, 1, and 1, do not give the user credit for three correct guesses€”just one. Save the file as Lottery.java.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: