Question: Textbook: Starting out with C++: From Control Structures through Objects (8th edition) Author: Tony Gaddis Problem: Chapter 7, Programming Challenge 7 My problem is to
Textbook: Starting out with C++: From Control Structures through Objects (8th edition)
Author: Tony Gaddis
Problem: Chapter 7, Programming Challenge 7
My problem is to do a variation on the above problem. I need to write the program using a vector. I need to declare an open vector of unknown size, then read numbers from the file numbers.txt (link to it is supplied in 7 Programming Challenge). Use the push_back function to add an element to the array. Use a size member function to determine the final size of the vector. Then I need to calculate the following data and display the following data like the other problem.
-The lowest number in the array
-The highest number in the array
-The total of the numbers in the array
-The average of the numbers in the array
A solution or guide would be greatly appreciated.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
