Question: Make a program that creates an array (intArray) that holds 50 values. Make the following functions (and use them): fill the array with a given
Make a program that creates an array (intArray) that holds 50 values. Make the following functions (and use them):
- fill the array with a given number of random integers between a given minimum and maximum.
- with the array as input, find the minimum value, return the minimum to main
- with the array as input, find the maximum value, return the maximum to main
- with the array as input, find the sum of the values, return the sum to main
- with the array as input, print all the values in the array - pass in a variable that lets the function know how many values to print per line, pass in a variable that lets the function print either to cout or to a file.
in main, call all the functions:
- fill the array with 50 random integers between -75 and 200
- print the array to cout
- print the array to yourname.txt
- print the minimum
- print the maximum
- print the sum
- print the average
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
