Discover answers to your questions with Westonci.ca, the leading Q&A platform that connects you with knowledgeable experts. Get expert answers to your questions quickly and accurately from our dedicated community of professionals. Discover detailed answers to your questions from a wide network of experts on our comprehensive 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.