Question: Write a program that generates 50 random numbers of type integer ranges from 1 to 100 and load all the numbers into a vector. The
Write a program that generates 50 random numbers of type integer ranges from 1 to 100 and load all the numbers into a vector. The program will calculate and display the largest, the smallest, the sum, and the mean values stored in the vector. Display all values on screen with ten numbers per line. Include a function called CalculateAvg() that will accept the vector array as an argument. The function will sort the array vector in ascending order and return the mean value. Your program should implement the C++ vector features.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
