Given an array of integers and it’s average (i.e. mean - you can read in the array and it’s average) – draw a flowchart that illustrates an algorithm for calculating the standard deviation of the array elements. code example
Example: cpp program to find average of n numbers
#include <iostream>
using namespace std;
int main() {
double numbers[] = {7, 5, 6, 12, 35, 27};
double sum = 0;
double count = 0;
double average;
cout << "The numbers are: ";
for (const double &n : numbers) {
cout << n << " ";
sum += n;
++count;
}
cout << "\nTheir Sum = " << sum << endl;
average = sum / count;
cout << "Their Average = " << average << endl;
return 0;
}