Question: For any integer n > 0, n! (n factorial) is defined as the product n* n - 1 * n - 2 ... * 2

For any integer n > 0, n! (n factorial) is defined as the product n* n - 1 * n - 2 ... * 2 * 1. And O! is defined to be 1. It is sometimes useful to have a closed-form definition instead; for this purpose, an approximation can be used. R.W. Gosper proposed the following approximation formula: n! z n'en 1 2n + 3 TT a) Create a function takes n as input and returns the approximation for factorial value. c) Your program should prompt the user to enter an integer n, call function to compute the approximate and accurate values for n!, and then display the results. The message displaying the result should look something like this: 5! equals approximately 119.97003 Use C loop control statements for and while in function A Define Pl as constant macro #define PI 3.14159265 Make sure negative number are not accepted For function A In function A: use unsigned long long int to take large factorials
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
