Question: Microsoft C# 2015: An Introduction to Object-Oriented Programming by Joyce Farrell Chapter 4 Program Exercise 9. Create a lottery game named Lottery. Generate 3 random
Microsoft C# 2015: An Introduction to Object-Oriented Programming by Joyce Farrell
Chapter 4 Program Exercise 9.
Create a lottery game named Lottery. Generate 3 random numbers, each between 1 and 4, 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 digit number, and the amount of money the user has won as follows.
matching number Award ($)
----------------------------------------------
any one matching 10
Two matching 100
three matching,
not in order 1000
three matching,
in exact order 10000
no matches 0
Make certain that your application accomodates repeating digits, for example. if a user guesses, 1, 2, and 3, and the randomly generated digits are 1, 1, and 1, do not give the user credit for 3 correct guesses--just one.
As a final note try not to use anything "fancy", I'm not very far in this book and they expect me to cover if elses, ||'s, &&'s, stuff like that. Nothing past the very basics please.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
