Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write a C++ program by Visual Studio. Instructions Instructions Programmi

ID: 3727925 • Letter: P

Question

Please write a C++ program by Visual Studio.

Instructions Instructions Programming Exercise 12 in Chapter 6asks you find the mean and standard deviation of five numbers. Extend this programming exercise to find the mean and standard deviation of up to 100 numbers. Suppose that the mean (average) of n numbers xi, Xz, ..., x is x. Then the standard deviation of these numbers is: Code from Programming Exercise 12 in Chapter 6 has been included for you. #include #include #include using namespace std; double findMean(double x1, double x2, double x3, double x4, double x5); double findStd Dev(double x1, double x2, double x3, double x4, double x5); int main( double x1, x2, x3, x4, x5; cout

Explanation / Answer

#include <iostream>

#include <cmath>

#include <iomanip>

using namespace std;

double findMean(double numbers[]);

double findStdDev(double numbers[]);

int main(){

double numbers[100];

cout << fixed << showpoint << setprecision(2);

cout << "Enter 100 numbers:";

for(int i = 0; i < 100; i++)

cin >> numbers[i];

cout << endl;

cout << "The mean of the numbers is:" << findMean(numbers);

cout << "The standard deviation of the numbers is:" << findStdDev(numbers);

}

double findMean(double numbers[]){

double sum = 0;

for(int i = 0; i < 100; i++)

sum += numbers[i];

return sum / 100.0;

}

double findStdDev(double numbers[]){

double mean = findMean(numbers);

double stdDev = 0;

for(int i = 0; i < 100; i++)

stdDev += sqrt(pow(numbers[i] - mean, 2));

return stdDev;

}

**Comment for any further queries.