printf("\nx = %4.1f exp = %12.5E series = %12.5E
number of terms = %d",
x, exp(-x), sum, n);
} // end of for() loop
printf("\n"); // a final line shift on output
return 0;
} // End: function main()
// The function factorial()
// calculates and returns n!
TYPE factorial(int n)
{
int loop;
TYPE fac;
for(loop = 1, fac = 1.0; loop <= n; loop++) {
fac *= loop;
return fac;
} // End: function factorial()