Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C + + : This program will use statistics ( I ' ll describe how to calculate them ) . Write a program that prompts

C++: This program will use statistics (I'll describe how to calculate them). Write a program that prompts for response times from a web site in milliseconds. It should keep asking for values until the user enters a -1 to stop.
The program should print the average time (mean), the minimum time, the maximum time, and the standard deviation.
To compute the average (mean):
1. Compute the sum of all the values.
2. Divide the sum by the number of values.
To compute the standard deviation:
1. Calculate the difference from the mean of each number and square it.
2. Compute the mean of the squared values.
3. Take the square root of the mean.
Example Output:
Enter a number: 100
Enter a number: 200
Enter a number: 1000
Enter a number: 300
Enter a number: -1
Numbers: 100,200,1000,300
The average is: 400.
The minimum is: 300.
The standard deviation is: 400.25.
Use loops and arrays to perform input and mathematical operations. Use functions to compute means, the maximum value, the minimum value, and the standard deviation. Be sure to keep the input separate from the computing and the output.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

Factors Affecting Conflict

Answered: 1 week ago

Question

Describe the factors that lead to productive conflict

Answered: 1 week ago

Question

Understanding Conflict Conflict Triggers

Answered: 1 week ago