Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Discover a wealth of knowledge from experts across different disciplines on our comprehensive Q&A 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.