/* nag_gamma_dist(g01efc) Example Program * * Copyright 1990 Numerical Algorithms Group. * * Mark 1, 1990. */ #include #include #include #include int main(void) { double a, b, g, p; /* Skip heading in data file */ Vscanf("%*[^\n]"); Vprintf("g01efc Example Program Results\n"); Vprintf(" Gamma deviate Alpha Beta Lower tail prob.\n\n"); while (scanf("%lf %lf %lf", &g, &a, &b) != EOF) { p = g01efc(Nag_LowerTail, g, a, b, NAGERR_DEFAULT); Vprintf(" %9.2f%13.2f%9.2f%14.4f\n", g, a, b, p); } return EXIT_SUCCESS; }