Question: C++ 1. Create an array of 100 integers. 2. Create a function fill_random () that will take the array and its size as parameters and
1. Create an array of 100 integers. 2. Create a function fill_random () that will take the array and its size as parameters and assign a random number between 1 and 1000 to each element using the following expression: - rand() \& 1000+1 3. Create a function average () to calculate and return the average (as a floating-point value) of the array. Add code to your main program to call the function with the array you created in step 1 , and print the result to the screen. 4. Create a 2-dimensional array with 15 rows and 15 columns, capable of storing characters. 5. Write a function make puzzle () that will take the 2-D array and the number of rows it contains as parameters. The function should fill the array with random characters by assigning values between ' a ' and ' z ' using the following expression: - static_cast( rand () \& 26+ s a' ) 6. Write a function print puzzle () that will take the 2 D array and the number of rows it contains as parameters. The function should print the array to the screen, separating the characters with one space and placing a newline after each row. (The output should appear square.) 7. Move the function prototypes and definition 5 you created into a new header file named array_functions.h. Be sure to protect the contents of the header file with include guards, and include it in your main program. Test that vour rode still works
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
