Question: please answer #2 and #3 much thx! 2. Factorial function Using the factorial function that was defined in the video, create a program that will

 please answer #2 and #3 much thx! 2. Factorial function Using

please answer #2 and #3 much thx!

2. Factorial function Using the factorial function that was defined in the video, create a program that will print out the factorial of a number. So, your main should look like: #include #include unsigned int factorial (unsigned int n) int main(int argc, char **argv) int n = atoi (argv[1]); int f = factorial (n); printf("factorial of %d is %d ", n, f); You will need to fill in the factorial function code, and when you run the program, you should get: $ gcc -o factorial factorial.c $ ./factorial 5 factorial of 5 is 120 3. Binomial function Using the factorial function, create a new program that will calculate the binomial coefficient or (). Mathematically, () = - the program should be as follows (n-k)!! The output of $ ./binom-coeff 7 3 7 choose 3 is 35

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 Databases Questions!