# Write a program that computes the average and standard deviation of four scores.

Write a program that computes the average and standard deviation of four scores..

I’m stuck on a Software Development question and need an explanation.

Write a program that computes the average and standard deviation of four scores. The standard deviation is defined to be the square root of the average of the four values. Use two functions. One function to calculate the average, this function should be with Return Type “double”. Second Function should be to calculate standard deviation, this function should be with Return Type “void”. Allow the program to continue until the user tells the program he/she is finished.

average = (s1 + s2 + s3 + s4) / 4

The standard deviation is computed as

standard_deviation = sqrt( ( (s1 -average)2 + (s2 – average)2 + ( s3 – average)2 + (s4 – average)2 )/4 ).

SAMPLE OUTPUT

Enter four decimal numbers =>12.3 13.4 10.5 9.0

The average = 11.3

The standard deviation of these numbers = 1.68375

Please enter y to continue =>y

Enter four decimal numbers =>1 2 3 4

The average = 2.5

The standard deviation of these numbers = 1.11803

Please enter y to continue =>n

file type : cpp

Write a program that computes the average and standard deviation of four scores.