Write a program to generate 3 random numbers in range 0-9. Let the user guess these three numbers. Display appropriate message to the user based on the following requirements:
Matching Numbers
Award
Any one matching
You won RM10
Two matching
You won RM100
Three matching, not in order
You won RM1000
Three matching in exact order
You won RM1,000,000
No matches
You won RM0
Sample Output 1
Enter the first digit of your guess 2
Enter the second digit of your guess 5
Enter the third digit of your guess 8
You guess was 2 5 8
and the random number was 1 0 7
You won $0
Sample Output 2
Enter the first digit of your guess 1
Enter the second digit of your guess 3
Enter the third digit of your guess 7
You guess was 1 3 7
and the random number was 1 0 7
You won $100
1
Expert's answer
2018-09-27T02:26:47-0400
Dear Tristan, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Comments
Leave a comment