Question: Create the pseudocode for a lottery game application. Generate three random numbers, each between 0 and 9 . Allow the user to guess three numbers.

Create the pseudocode for a lottery game application. Generate three random numbers, each between 0 and 9.
Allow the user to guess three numbers. Compare each of the users guesses to the three random numbers and
display a message that includes the users guess, the randomly determined three digits, and the amount of money
the user has won, as shown in Figure 4-26.
Figure 4-26 Determining
lottery awards Matching
Numbers
Award ($)
No matches 0
Any one matching 10
Any two matching 100
Three matching, not in order 1000
Three matching in exact order 1,000,000
PSEUDOCODE FORMAT SAME AS PREVIOUS CHAPTERS.
Must use the following declarations in you pseudocode:
Declarations
num randomNumber1
num randomNumber2
num randomNumber3
num guess1
num guess2
num guess3
num win
num LIMIT =10
num ONE_MATCH =10
num TWO_MATCH =100
num THREE_MATCH_NO_ORDER =1000
num THREE_MATCH_IN_ORDER =1000000
num NO_MATCH =0
string PROMPT = "Enter three numbers between 0 and 9>>"

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!