C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
bartleby

Videos

Textbook Question
100%
Book Icon
Chapter 6, Problem 12PE

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 1 ,   x 2 ,   x 3 ,   x 4 , and  x 5 , then the mean is x = ( x 1 + x 2 + x 3 + x 4 + x 5 ) / 5 and the standard deviation is:

s = ( x 1 x ) 2 + ( x 2 x ) 2 + ( x 3 x ) 2 + ( x 4 x 2 ) + ( x 5 x 2 ) 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.

Blurred answer
Students have asked these similar questions
Write a program that would read 3 1-digit numbers say x,y, and z and would output the following:x*y<z     if x*y is less than zx*y=z     if x*y is equal to zx*y>z     if x*y is greater than zEx. if the inputs ate 5 6 9, output is 5*6>9
Write a program that exchanges the value of x and y. The output must be: the value of variable y and will become the value of variable x, and vice versa
Write a program that takes an integer number between 0 to 100 as input and outputs one of the following: The entered number XXX is Small The entered number XXX is Medium The entered number XXX is Big The entered number XXX is Huge (Where XXX should be the input number) 0 - 25 are considered small 26 - 50 are considered medium 51 - 75 are considered big 76 - 100 are considered huge Any other number should be rejected. Ex: If the input is: 64 the output is: The entered number 64 is Big
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY