Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help solve using java ottery Game Get Create a class name Lottery with a main method. . Create the following variables: lottery (int) and
Please help solve using java
ottery Game Get Create a class name Lottery with a main method. . Create the following variables: lottery (int) and initialize it to 57 : The number that a player needs to guess guess (int) and initialize it to 27: The number that a player will insert Print the lottery number. If the guessed number (guess) is equal to the lottery number (lottery), print a message that the player wins $10,000. If all the digits of the guessed number (guess) match the digits of the lottery number (lottery) (not in the same order), prints a message that the player wins $3,000. If one of the digits of the guessed number (guess) matches one digit of the lottery number (lottery), prints a message that the player wins $1,000. . Else print a message that the digits did not match. . Assume that the game only accepts a two digits positive number. The digit may be 0. If the number is less than 10, assume that the number is preceded by a 0 to form a two-digits number. For example, 6 is treated as 06 and 0 is treated as 00Step 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