Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Solve the initial-value problem. xy' = y + x 2 sin x, y() = 0

Answered: 1 week ago