/*STANDERD DEVIATION*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n,x[100],sum,i;
float mean,vsum,ksum,sd;
clrscr();
printf("Enter the n value\n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&x[i]);
}
for(i=0;i<n;i++)
sum=sum+x[i];
mean=sum/n;
for(i=0;i<n;i++)
vsum=vsum+((x[i]-mean)*(x[i]-mean));
ksum=vsum/n;
sd=sqrt(ksum);
printf("%f",sd);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n,x[100],sum,i;
float mean,vsum,ksum,sd;
clrscr();
printf("Enter the n value\n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&x[i]);
}
for(i=0;i<n;i++)
sum=sum+x[i];
mean=sum/n;
for(i=0;i<n;i++)
vsum=vsum+((x[i]-mean)*(x[i]-mean));
ksum=vsum/n;
sd=sqrt(ksum);
printf("%f",sd);
getch();
}
i need c program to find standard deviation using array
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteKapan Lagi Ada Promo Menarik ? Hanya DI BOLAVITA Anda bisa Mendapatkannya
ReplyDeleteBosan Menang tidak dibayar ? judi sabung ayam
ReplyDeletes1288 sabung ayam
ReplyDeleteAyam Aduan Asli Indonesia Sangat Terawat Dan Terlatih
Klik dulu baru bisa rasakan ayam bangkok
ReplyDeleteTips dan Trick Bermain Judi Online
ReplyDeleteAgen Togel Hongkong
Museumbola Slot IDN
Museumbola Slot Pragmatic
Museumbola Slot Pulsa
AKSES SEGERA SITUS KAMI 1 ID BANYAK PERMAINAN
WA OFFICIAL : +6283157394921