Question: c++ Q3. Write a C/C++ program which will perform the following: You will have a function called myRandom) 1. Your myRandom() function will accept two
Q3. Write a C/C++ program which will perform the following: You will have a function called myRandom) 1. Your myRandom() function will accept two integer parameters called upper and lower. In the body of th function you will generate a random integer value between upper and lower. At the end, your function will return the generated random integer value. In your main function: 1. Make sure that myRandom() will generate different integers at every execution. 2. Declare an integer array called myArrayl) with 15 elements. 3. Take two integers from the keyboard called x and y. 4. Fill your array elements with random integers by calling your myRandom() function. Pay attention that, the parameters of the function will be x and y. That is to say, your function will return random integers between x and y. 5. Display all myArray) elements on the monitor side by side, separated by a TAB. 6. Count and display the number of even values among the myArrayll elements. (HINT: a = (rand()%{max-min+1))+min, where a is random integer between min and max)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
