Question: a. a function with the header: unsigned long factorialFunc( const unsigned long n) that gets the positive integer n and calculates n! [5pts]. n! =

a. a function with the header:

unsigned long factorialFunc( const unsigned long n)

that gets the positive integer n and calculates n! [5pts].

n! = n*(n-1)* (n-2)* (n-3) ... * 3 * 2 * 1;

b. The trigonometric function sin(x) can be approximately calculated using the following formula, where n! is factorial(n) - for example 3!=3*2*1 = 6 (the function in previous problem).

a. a function with the header:unsigned long factorialFunc( const unsigned long n)that

\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!