Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Sunday, April 4, 2010

To find and print the standard deviation.

Write a program in C to input 12 numbers and then calculate, print the standard deviation of these numbers.
H&R Block At Home 2009 Deluxe Federal + State + eFile [Formerly TaxCut] [Download]

#include<stdio.h>
#include<conio.h>
#include<math.h>
#define N 12

void main( )
{
float x, sx, sxx, sd, a;
sx = sxx = 0;
for (a=1; a<=N; a++)
{
printf("Enter value of x");
scanf("%f", &x);
sx = sx + x;
sxx = sxx + x * x;
}
sd = sqrt(sxx / N - (sx/N) * (sx/N));
printf("Standard Deviation is %.2f\n", sd);
}

Super Mario Galaxy 2

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP