0
1.1kviews
Write a program to evaluate the value of the standard deviation and display the result.

$Sd = \sqrt{Σ_{i = 1}^n(xi - \bar{x})^2/n}$

Where x = Average of all no is array


Mumbai university > FE > SEM 2 > Structured Programming Approach

Marks: 10M

Year: May 2014

1 Answer
0
5views
#include <stdio.h>
#include <math.h>
float standard_deviation(float data[], int n);
void main()
{
    int n, i;
    float data[100];
    printf("Enter number of datas( should be less than 100): ");
    scanf("%d",&n);
    printf("Enter elements: ");
    for(i=0; i<n; ++i)
        scanf("%f",&data[i]);
    printf("\n");
    printf("Standard Deviation is %f", standard_deviation(data,n));
    getche();
}
float standard_deviation(float data[], int n)
{
    float …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.