Question: 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

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 digits, which should be stored in an integer array named user. The program is to compare the corresponding elements in the two arrays and keep a count of the digits that match. For example: Lottery array: 749 3 User array: 429 73 The program should display the random numbers generated in lottery array and the number of matching digits-2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
