Question: Write a program that declares a vector of real numbers, and inputs values until a 0 is en- tered. Add the values to the

Write a program that declares a vector of real numbers, and inputs 

Write a program that declares a vector of real numbers, and inputs values until a 0 is en- tered. Add the values to the vector by using push_back(), and compute both the average and the maximum value of the numbers. Output the average and the maximum. Use the upcoming statements that initialize max to have the value. The first real number en- tered will become the new maximum. ORT: double zero = 0.0; // start max at -infinity double max = -1.0/zero;

Step by Step Solution

3.53 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

program to find the average and the maximum value from the given vectors INPUT a vector of real numb... View full answer

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 Computer Engineering Questions!