Question: C Programming Given that the mathematical formula for a Factorial calculation (written n!) is: n! = n * (n - 10) * (n - 2)
C Programming

Given that the mathematical formula for a Factorial calculation (written n!) is: n! = n * (n - 10) * (n - 2) * (n - 3) * ..*1 where n is a positive integer (i) Write a C function called factorial, which: accepts an integer value n in the range 0 to 10 calculates n! using a loop and returns the result for the function as a suitably sized variable type. Note that 10! = 3628800 and 0! = 1 (ii) Briefly explain the lines of program which control the loop and determine how many times the loop runs. (iii) Briefly explain the lines of program which calculate the factorial value and why you chose a particular return value type
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
