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 generates a random two-digit integer. The program prompts the user to predict the generated number by entering a two- digit integer, and then determines the accuracy of the user’s prediction according to the following rules:If the user’s prediction matches the generated number exactly, the accuracy is 100%. If one digit in the user’s predicted number matches a digit in the gener- ated number, the accuracy is 50%. If none of the digits in user’s predicted number matches with the generated number, the accuracy is 0%.
3. Write a program that accepts two input numbers and compute the Greatest Common Divisor using do-while To get the GCD of another input number, type Y or y; otherwise, type N or n to quit the program. Sample Output: Enter the value of the first number: 10 Enter the value of the second number: The Greatest Common Divisor of 10 and 6 is 2 Type Yly if you want to try again. Type N/n to exit. :
Perform the following using DEV-C++ Show your solution Write a program that determines a student’s grade. It reads four test scores (between0 and 100) and calculates the grade based on the following rules: If the average score is 90 or more, the grade is ‘A’. If the average score is between 80 and 90, the grade is ‘B’. If the average score is between 70 and 80, the grade is ‘C’. If the average score is between 60 and 70, the grade is ‘D’. If the average score is less than 60, the grade is ‘F’.
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++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY