Question: A lottery machine program generates random numbers as follows: 1. All generated numbers should be unique 2. All generated numbers have 5-digit length 3.

A lottery machine program generates random numbers as follows: 1. All generated

A lottery machine program generates random numbers as follows: 1. All generated numbers should be unique 2. All generated numbers have 5-digit length 3. The machine generates 100 random lottery tickets (numbers) and pick ONLY two lucky tickets from it as a winner A user can try his luck as many as he can, the lottery program quit when the user press Q or q. A program should quit also when the user won. Develop a C program to perform the lottery program as functions, and call them from the main: StartLottery function, to start the lottery machine program as specified above PlayGame function, to prompt the user to enter a 5-digit number u press Q or q character. The same function will call another function WinOrLoss WinOrLoss function, to test if the user won or no by comparing the entered he/she number with the winner tickets Sample Output Welcome to The Lottery Program Press S or s to start the lottery - Press Q or q to quit Input a 5-digit number 11253 11253 is NOT the winner number, try your luck again [Q/q to quit] Input a 5-digit number 77862 | 11253 is NOT the winner number, try your luck again [Q/q to quit] Input a 5-digit number 84610 Cognates, You WON ;)

Step by Step Solution

3.41 Rating (170 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Thanks for the question Below is the C code you will be needing Let me know if you have an... View full answer

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 Accounting Questions!