/* nag_dawson (s15afc) Example Program. * * Copyright 2002 Numerical Algorithms Group. * * Mark 7, 2002. */ #include #include #include #include int main(void) { double x, y; Integer exit_status = EXIT_SUCCESS; /* Skip heading in data file */ Vscanf("%*[^\n]"); Vprintf("nag_dawson (s15afc) Example Program Results\n"); Vprintf(" x y\n"); while (scanf("%lf", &x) != EOF) { /* nag_dawson (s15afc). * Dawson's integral */ y = nag_dawson(x); Vprintf("%12.3e %12.3e\n", x, y); } return exit_status; }