Question: Write a program (using C program) to simulate a simple lottery engine. The user must enter 5 integer numbers, within the range of 10 to
Write a program (using C program) to simulate a simple lottery engine. The user must enter 5 integer numbers, within the range of 10 to 30. The lottery engine must validate that all the numbers entered by the user are within the range of 10 to 30. The lottery engine must then produce 1 random winning number, also within the range of 10 to 30, and print it. If the winning number matches any of the 5 user numbers, a winning message must be printed congratulating the user. If the winning number does not match any of the user numbers, a “good luck next time” message must be printed. Notes: Use the clock() function to generate the winning number. You can use the given template as a starting point for your program. Using C program?
Step by Step Solution
There are 3 Steps involved in it
Heres a C program that simulates a simple lottery engine c include stdio h include stdlib h include ... View full answer
Get step-by-step solutions from verified subject matter experts
