Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i really need a simple code beginner as possible ... ( java ) please ! simple as possible, (we didnt het up to we didnt

i really need a simple code beginner as possible ... ( java ) please ! simple as possible, (we didnt het up to we didnt get ip to buffer reader or inputstream.)
image text in transcribed
Question 1 (60 points) (Extension of the participation Week 3 problem ) Write a method lottoNumFirstname that takes in a winning lottery of a three-digit number (selected by random number generator ), prompts the user to enter a three-digit number, and determines whether the user wins according to the following rule. Please use a solution that includes numbers only and no strings: If the user input matches the lottery in exact order, the award is $10,000. If all digits in the user input match all the digits in the lottery number, the award is $7,000. For example lottery number 234 and guess number of 432 or 423 or 243 or 342 or 324 If two continuous digits in the user input match two continuous digits in the lottery number, the award is $4,000. For example lottery number 234 and guess number of 235 or 534. But for lottery number 234 guess number of 254 does not work. (Only if continuous.) In all other cases print "Sorry play again". For example lottery number 234 and guess number of 965 or 278

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

Surfactant Enhanced Subsurface Remediation Emerging Technologies

Authors: David A. Sabatini, Robert C. Knox, Jeffrey H. Harwell

1st Edition

0841232253, 978-0841232259

More Books

Students also viewed these Chemical Engineering questions

Question

Listens effectively to others ideas and points of view.

Answered: 1 week ago