#include #include #include long fact(int n) { if(n 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); printf("\n\tGeometric Mean = %lf",geomean(x,p,q)); } else if(ch==2) { printf("\n\tEnter the value...
Data and Tech notes for students and professionals