- #1
coso21
- 3
- 0
I need help writing the code for a simple lottery machine. Here are the key points.
Ask the user to choose 3 numbers between 1 and 20. Randomly generate 3 winning numbers that are between 1 and 20. Determine how many, if any, of the users numbers match the winning numbers. If (hypothetically) no matches doesn't win anything, 1 match wins $10, 2 matches wins $50 and 3 matches wins $200, tell the user how much they have theoretically won. Write down your program design process. How can you check if the program works?
Thanks to anyone who can help me out. It will be greatly appreciated.
Ask the user to choose 3 numbers between 1 and 20. Randomly generate 3 winning numbers that are between 1 and 20. Determine how many, if any, of the users numbers match the winning numbers. If (hypothetically) no matches doesn't win anything, 1 match wins $10, 2 matches wins $50 and 3 matches wins $200, tell the user how much they have theoretically won. Write down your program design process. How can you check if the program works?
Thanks to anyone who can help me out. It will be greatly appreciated.