My problem is how to do step 4:
4. check the tickets purchased against the winning number and print out the results as
follows:
Ticket 1: 2-17-22-30
1 match: 17
Ticket total $2.00
Ticket 2: 16-5-42-25
2 matches: 16, 42
Ticket total: $20.00
Ticket 3: 40-11-28-72
no matches
Ticket total: $0.00
Ticket 4: 34-8-16-1
1 match: 16
Ticket total: $2.00
...
User Profile
Collapse
-
Hard lottery project.
You are to create a lottery game program that allows a user to simulate playing the lottery. In
this lottery game, the winning number combination comprises four unique numbers, each in
the range of 1 to 40
A winning ticket will match from one to four numbers and pay-out based on the following
schedule: 1 number matched = $2.00, 2 numbers matched = $20.00, 3 numbers matched
$100.00, and 4 numbers matched = $1,000....
No activity results to display
Show More
Leave a comment: