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
A typical NMR peak after Fourier transform has a Lorentzian absorptive line shape. This line shape is represented by the function below, where x is in Hz 1 f (x) : x2 + 1 Write a program to calculate the integral of this function using Riemann sums on the range from [-10, 10] (inclusive) with dx = 0.01. In other words, estimate the following integral with a Riemann sum. 10 1 x2 + 1 -10
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
Write a program for solving the following equations : R = 2x²+x-3 (az-²1) + (2y+1) x and y should be taken as user input. Attach one snapshot for each equation you may input x and y values as integer or float any one is fine. T=
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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY