Write a program that imitates a lottery. The program will use two one-dimensional arrays to store the winning numbers and the user's choices. A function will be use to decide whether the user has won or not.
The program should:
- Declare two arrays that hold 5 ints
- One of the arrays, named winningDigits[],
- should have elements that are randomly generated integers between the values 1 and 20.
- The assigning of the elements of the array winningDigits[] should be done in a function void pickwinning(int [], int).
- The program should ask the user to enter 5 integers between 1 and 20.
- Values less than 1 or greater than 20 should not be accepted.
- The valid input values should be stored in the second int array of 5 elements, pickfive[].
- In a function, int compareValue(const int [], const int [], int),
- the two arrays should be compared element by element.
- The function counts the number of identical elements and returns this value.
- The program should then print out the winning digits, the user's digits and how many elements were a match.