Question: no arrays please #1 Lottery program - 8 points Develop a Java program to play the lottery. The program will randomly generate a two-digit number

no arrays please no arrays please #1 Lottery program - 8 points Develop a Java

#1 Lottery program - 8 points Develop a Java program to play the lottery. The program will randomly generate a two-digit number to represent the lottery numbers (the lottery numbers are single-digit, generating a two-digit number makes this easier). The program will ask the user for a two-digit number. The program will determine if the user wins according to the following rules: 1. If the user matches the lottery numbers in exact order, the user wins $10,000 2. If the user matches both numbers, out of order, the user wins $3,000. 3. If the user matches one digit, the user wins $1,000. A sample run of this program might look like this (user input is in red): Enter your two-digit lottery numbers: 56 The lottery numbers were 25, you win $1,000. A second run of this program might look like this (user input is in red): Enter your two-digit lottery numbers: 56 The lottery numbers were 56, you win $10,000. A third run of this program might look like this (user input is in red): Enter your two-digit lottery numbers: 56 The lottery numbers were 12, you win $0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!