#include <stdio.h>
#include <math.h>
#define MAX 5
int
main (void)
{
double mean, sd, sum, sumsq;
double x[] = {10.0, 15.0, 20.0, 10.0, 30.0};
int i;
sum = 0;
sumsq = 0;
for (i=0; i<MAX; ++i)
{
sum = sum + x[i];
sumsq = sumsq + x[i] * x[i];
}
mean = sum / MAX;
sd = sqrt(sumsq / MAX - mean * mean);
printf ("The mean is %lf. \n", mean);
printf ("The standard deviation is %lf. \n", sd);
return (0);
}