/* nag_binomial_dist(g01bjc) Example Program. * * Copyright 1996 Numerical Algorithms Group. * * Mark 4, 1996. * */ #include #include #include #include int main(void) { double plek, peqk, pgtk; double p; Integer k, n; Vprintf("g01bjc Example Program Results\n"); /* Skip heading in data file */ Vscanf("%*[^\n] "); Vprintf("\n"); Vprintf(" n p k plek pgtk peqk\n\n"); while ((scanf("%ld %lf %ld%*[^\n]", &n, &p, &k)) != EOF) { g01bjc(n, p, k, &plek, &pgtk, &peqk, NAGERR_DEFAULT); Vprintf("%5ld%8.3f%5ld%10.5f%10.5f%10.5f\n",n, p, k, plek, pgtk, peqk); } return EXIT_SUCCESS; }