Write a program using Standard Division.
Program:
Program:
#include
<stdio.h>
#include
<math.h>
main
() {
int n, i, sum=0, a[50] , b[50], avg, sd=0;
float sd1, sd2;
scanf ("%d", &n);
for (i=0; i<n; i++){
scanf ("%d",
&a[i]);
sum = sum=a[i];
}
avg = sum/n;
printf ("Avg = %d\n", avg);
for (i=0; i<n; i++){
b[i] =
avg-a[i];
printf
("%d\n", &b[i]);
sd =
sd+(b[i]*b[i]);
}
sd1 = (sd)/n;
sd2 = sqrt (sd1);
printf ("SD = %f", sd);
}