EBK C++ PROGRAMMING: PROGRAM DESIGN INC
EBK C++ PROGRAMMING: PROGRAM DESIGN INC
8th Edition
ISBN: 9781337669085
Author: Malik
Publisher: VST
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 reads integers between 1 and 100 and counts the occurrences of each. Assume the input ends with 0. Write a program that reads integers between 1 and 100 and counts the occurrences of each. Assume the input ends with 0.   Here is a sample run of the program: Enter integers from 1-100 (input 0 value to end inputs): 2 5 6 5 4 3 23 43 2 02 occurred 2 times3 occurred 1 time4 occurred 1 time5 occurred 2 times6 occurred 1 time23 occurred 1 time43 occurred 1 time
Write a program that calculates the equivalent resistance of a circuit. n electrical resistors with resistance values R1, R2,.., Rn are said to be connected in parallel if the same voltage is applied across each. Their equivalent resistance Reg is related to the values R1, R2, ..., Rn by: 1 1 1 1 + +...+ R R R, R. "eq Write a program that prompts the user to enter the resistance of n resistors. The user should be prompted continuously by using a while loop until a zero or negative value is entered (the program should count the number of resistors n entered by the user and store the values in an array). Use another separate loop to print the resistance values entered by the user and the equivalent resistance Reg. Test your program with R1= 1 kn, R2= 2 kn, R3= 4 kQ and R4= 8 kQ.
Use python The speeding ticket fine policy in Wonderland-Bemidji is $50 plus $5 for each mph over the limit, plus an additional penalty of $200 for any speeds over 90mph. Write a program that accepts a speed limit (<= 90) and a clocked speed, and either outputs a message indicating the speed was legal, or prints the amount of the fine if the speed is illegal.
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