IDNLearn.com provides a collaborative environment for finding accurate answers. Our community is here to provide detailed and trustworthy answers to any questions you may have.
(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.
Sagot :
Thank you for joining our conversation. Don't hesitate to return anytime to find answers to your questions. Let's continue sharing knowledge and experiences! IDNLearn.com has the solutions you’re looking for. Thanks for visiting, and see you next time for more reliable information.