#include #include #include long fact(int n) { if(n<=0)
return 1;
else
return n*fact(n-1);
}
double geomean(int x,double p,double q)
{
if(x>0) return pow(q,x-1)*p; else return 0; } double weibpdf(int x, double v, double a, double b) { if(x =0) return fact(n)/(fact(x)*fact(n-x))*pow(p,x)*pow(q,n-x); else return 0; } int main() { int ch; double p,q,v,a,b; int x,n; clrscr(); do { printf("\nExit."); printf("\nGeometric Mean."); printf("\nWeibull Distribution."); printf("\nPoisson Distribution."); printf("\nBinomial Distribution."); printf("\nEnter your choice => "); scanf("%d",&ch); if(ch==1) { printf("\n\tEnter the value of x,p,q => "); scanf("%d%lf%lf",&x,&p,&q); prin
Data and Tech notes for students and professionals