Welcome to Westonci.ca, the place where your questions are answered by a community of knowledgeable contributors. Find reliable answers to your questions from a wide community of knowledgeable experts on our user-friendly Q&A platform. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform.

(Pick 5 Lotto) Write a program to simulate a pick-5 lottery game. Your program generates and stores 5 distinct random integers between 1 and 9 (inclusive) into an array. The program then prompts the user to enter 5 distinct integers between one and nine and stores the numbers into a second array. The program then compares and determines whether the two arrays are identical. If the two arrays are identical, then the user wins the game; otherwise, the program outputs the number of matching digits and their position in the array.

Use default_random_engine and unitform_int_distribution to generate the random numbers. See discussions to see engines and distributions details.