Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that simulates a lottery. The program shouldhave an array of fiv

ID: 3615355 • Letter: W

Question

Write a program that simulates a lottery. The program shouldhave an array of five integers named lotery , and should generate a random number in the range of 0through 9 for each element in the array. The user should enter five digits which should be stored in aninteger array named user . The program is to compare the corresponding elements in the two arrays andkeep a count of the digits that match. The program should display the random numbers stored in the lotery array and the number of matching digits. If all of them match, display a message proclaimingthe user as a grand prize winner. The program should repeat the lottery simulation until the user wants tostop. Write a program that simulates a lottery. The program shouldhave an array of five integers named lotery , and should generate a random number in the range of 0through 9 for each element in the array. The user should enter five digits which should be stored in aninteger array named user . The program is to compare the corresponding elements in the two arrays andkeep a count of the digits that match. The program should display the random numbers stored in the lotery array and the number of matching digits. If all of them match, display a message proclaimingthe user as a grand prize winner. The program should repeat the lottery simulation until the user wants tostop.

Explanation / Answer

please rate - thanks check the post--Gaddis arrays aren't until chapter 7 #include #include //#include using namespace std; string random(int,int); int main() {int lotery[5],match,named[5]; int i,play; srand(time(0)); do { for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote