Write a program that takes as input five numbers and outputs the mean (average) and standard...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that takes as input five numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are x₁, x2, x3, x4, and x5, then the mean is x = (x₁ + x₂ + x3 + x4 + x5)/5 and the standard deviation is: 8= (x₁ - x)² + (x₂-x)² + (x3 - x)² + (x₁ - x)² + (x₁ - x)² 5 Your program must contain at least the following functions: a function that calculates and returns the mean and a function that calculates the standard deviation. Write a program that takes as input five numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are x₁, x2, x3, x4, and x5, then the mean is x = (x₁ + x₂ + x3 + x4 + x5)/5 and the standard deviation is: 8= (x₁ - x)² + (x₂-x)² + (x3 - x)² + (x₁ - x)² + (x₁ - x)² 5 Your program must contain at least the following functions: a function that calculates and returns the mean and a function that calculates the standard deviation.
Expert Answer:
Answer rating: 100% (QA)
Solution include include include using namespace std int main numbers int x1... View the full answer
Related Book For
Data Structures and Algorithms in Java
ISBN: 978-1118771334
6th edition
Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
Posted Date:
Students also viewed these programming questions
-
Write a program that takes as input an arithmetic expression. The program outputs whether the expression contains matching grouping symbols. For example, the arithmetic expression {25 + (3- 6)*8} and...
-
Write a program that takes integers from the user one at a time. Assume the input is some number of positive integers. The user will type in 0 to end the input and the 0 should not be counted as...
-
When a share of common stock of some company is sold, the capital gain (or, sometimes, loss) is the difference between the shares selling price and the price originally paid to buy it. This rule is...
-
Revenue for the new startup company "BCB Excavating" for the years 2017 through 2021 have been $543,000, $603,400, $789,000, $845,000, and $889,000 respectively. Year 2017 2018 2019 2020 2021 2022...
-
Rena Reynolds, one of your firm's workers, has just come into the payroll department and says to you: ''I am thinking of amending my Form W-4 so that an additional $10 is withheld each week. That way...
-
Prove that the following formulas define norms on R2: (a) ||v|| = 221 + 3v22 (b) ||v|| = 2v21] - v1v2 + 2v22 (c) ||v|| =2|v1| + |v2| (d) ||v|| = max{ 2|v1|, |v2| } (e) ||v|| = max{ |v1, - v2|, |v1 +...
-
The comparative financial statements of Bien Taco Restaurants for 2010, 2009, and 2008 include the following selected data: Requirements 1. Compute these ratios for 2010 and 2009: a. Quick ratio. b....
-
Desrosiers Ltd. had the following long-term receivable account balances at December 31, 2013: Notes receivable........ $1,800,000 Notes receivable-Employees... 400,000 Transactions during 2014 and...
-
A firm has a leverage beta of 1.6 and a D/E ratio of 1. the firm long term target -leverage is D/E target = 0.5. Assuming that: the corporate rate is 50% the expected market return is 9% and free...
-
PROBLEM 2.60 Two cables tied together at C are loaded as shown. Determine the range of values of P for which both cables remain taut. 300 W 120 lb
-
The balance sheets for Federer Sports Apparel for 2025 and 2024 are presented below. Required: 1. Prepare a vertical analysis of the balance sheet data for 2025 and 2024. Express each amount as a...
-
Your local GPDOCS medical practice, has traditionally been open to serve patients from 8h00 17h00 Mondays to Fridays and closes on weekends. GPDOCS medical practice is entirely government funded and...
-
When mounted on low-density ceiling fibreboard, surface-mounted fluorescent luminaires must be installed to keep the temperature of the fibreboard below a certain level. What is that limit?
-
At the state government level, the main sources of income are: Multiple select question. social insurance and retirement receipts. tariffs. sales and excise taxes. state individual and corporate...
-
At what price does a company issue a $4,800,000, 6%, six-year bond if the market rate is 8% and interest is compounded semi-annually?
-
For a given MPT, using a 75% PSA model of prepayments, what would you expect the prepayment rate in month 41 be in relation prepayment in month 92?
-
Avalanche, Inc., just declared an increase in its annual dividend from $.78 per share to $.96 per share. If the stock price should remain constant, then Multiple Choice O O O O the capital gains...
-
Explain five different cases of income exempt from tax with clear examples.
-
Repeat the previous problem, but use knowledge of the size of the list to traverse from the end of the list that is closest to the desired index. Previous problem Suppose we want to extend the...
-
Suppose we are given two n-element sorted sequences A and B each with distinct elements, but potentially some elements that are in both sequences. Describe an O(n)-time method for computing a...
-
In the merge-sort tree shown in Figures 12.2 through 12.4, some edges are drawn as arrows. What is the meaning of a downward arrow? How about an upward arrow? Figures 12.2 Figures 12.4 85 24 45 17 31...
-
(a) Use a histogram to graph the empirical distribution of the duration times between American Airline trades. Compare the graph with Figure 2.9. Figure 2.9. (b) Interpret the shape of the...
-
Consider the equity prices of the United States companies Microsoft and Walmart for the period April 1990 to July 2004 ( \(T=172)\). (a) Compute the continuously compounded (log) returns on Microsoft...
-
(a) Compute the monthly excess returns on Exxon, General Electric, Gold, IBM, Microsft and Walmart. Be particularly carefully when computing the correct risk free rate to use. (b) Estimate the CAPM...
Study smarter with the SolutionInn App