(Game: lottery) Revise Listing 3.8, Lottery.java, to generate a lottery of a three-digit number. The program prompts the user to enter a three-digit number and determines whether the user wins...


(Game: lottery) Revise Listing 3.8, Lottery.java, to generate a lottery of a three-digit number. The program prompts the user to enter a three-digit number and determines whether the user wins according to the following rules:


1. If the user input matches the lottery number in the exact order, the award is $12,000.


 2. If all digits in the user input match all digits in the lottery number, the award is $5,000.


 3. If one digit in the user input matches a digit in the lottery number, the award is $2,000.

Nov 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here