Question: Hi, please help me with this question. Code in C++. thanks 9.1 Lotto We will program a simulated lottery game using functions, loops, arrays, and
Hi, please help me with this question. Code in C++. thanks

![and modular programming. Element Repeated Function bool elementRepeated(int a[], int element, int](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e5317ac34_41766f2e531067aa.jpg)

9.1 Lotto We will program a simulated lottery game using functions, loops, arrays, and modular programming. Element Repeated Function bool elementRepeated(int a[], int element, int end) Write a function that that takes as parameters an array of ints, an int value named element, and an int value named end. Return a bool based on whether the element appears in the array starting from index 0 and up to but not including the end index. Generate a Random Array with no Repeats void randFill(int a, int len) Write a function that takes as parameters an array of integers and another integer for the size of the array. Create a loop that assigns a random value in the range [1..25] to each element of the array. When assigning an element, loop and regenerate the random number if the Element Repeated function determines that number already exists in the array. Input Array void userFill(int a, int len) Write a function that takes as parameters an array of integers and another integer for the size of the array. Create a loop that asks the user to input a number between 1 and 25 for each element of the array. Use an input validation while loop to ensure these numbers are within range, the input did not fail (cin.fail()), and that the element is not repeated. Clear out the read buffer if the input failed. Assign each input to an element of the array. Your validation loop condition to should look like this: while(a[i] 25 || cin.fail() || elementRepeated(a, a[i], i)) { cin.clear(); cin.ignore (512, ' '); cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
