Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
program to find the average and the maximum value from the given vectors INPUT a vector of real numb...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started