Question: C++ --- only do question 2, but you have to see question 1 to do question 2 Question 1 Consider the following code segment: int

C++ --- only do question 2, but you have to see question 1 to do question 2C++ --- only do question 2, but you have to see question

Question 1 Consider the following code segment: int main() cons int SIZE = 20; int values [SIZE] - (0, 23, 34, -7, 110, 42, -350, 424, 25, 99, 10, 05, 50, -5, 1, 200, 350, 437, 25, 147; // your code goes here Write a complete program to display the values from each of the following four steps. All displays must be done in main. Use separate functions for each step below, passing the array to each function 1.1) Provide the sum of the numbers in this array -function must return an int. 1.2) Provide the average of the positive numbers in this array - function must return a double. 1.3) Provide the lowest number in the array function must return an int. 1.4) Povide the highest number in the array -function must return an int. Question.2 Re-do question 1 using vectors rather than arrays. The same testcases should be used

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!