Question: write the above program in C. only in C. 3.. The factorial of a nonnegative integer n (written nl) is defined as follows: n! 1*23*

write the above program in C. only in C.
3.. The factorial of a nonnegative integer n (written nl) is defined as follows: n! 1*23* ...*n (for values of n greater than or equal to 1) and n' = 1 (for n = 0) a. Prompt the user for an integer n between 5 and 12 for which the factorial is to be found. Use a while validation loop to restrict the value of n to an integer between 5 and 12. Use a for loop to determine the value of the factorial. Use type double for the factorial (although an int will work for 121, an int wll not store larger factorials) b. In the same program use a for loop to estimate the value of the mathematical constant e using the formula: Have the user enter the number of terms for the approximation. Print the estimation with 6 decimal digits. Test with 8 terms. Compare with the actual value of e using the exponential function from the math library
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
