Thursday, October 20, 2011

Bernouli distribution implementation


void bernouli()
{
double p;
printf("bernouli distribution implementation:\n");
printf("enter success probability");
scanf("%lf",&p);
printf("\nmean =%.3lf",p);
printf("\tvariance =%.3lf",p*(1-p));

}

No comments:

Post a Comment