Question
C Programming #include Lottery Application (#14 on page 458) MODIFIED Write a program that simulates a lottery. The program should have an array of five
C Programming
#include
Lottery Application (#14 on page 458) MODIFIED Write a program that simulates a lottery. The program should have an array of five integers named lottery and should generate a random number in the range of 0 through 9 for each element in the array. The user should enter five numbers, which should be stored in an integer array named user. The program is to compare the elements in the two arrays and keep a count of the digits that match. For example, the following shows the lottery array and the user array with sample numbers stored in each. The user has matched 2 numbers 1 and 3.
Lottery Array: 7 1 9 1 3
User Array: 4 2 1 3 5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started