Westonci.ca connects you with experts who provide insightful answers to your questions. Join us today and start learning! Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A 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.