Question: I completed question (a) with the C code below, but I am completely stumped with part b. #include int main() { int i, Digit, fact

I completed question (a) with the C code below, but I am completely stumped with part b.

#include

int main() {

int i, Digit, fact = 1;

printf("Enter a number to calculate its factorial : ");

scanf("%d", &Digit);

for (i = 1; i

fact = fact * i;

printf("Factorial of %d = %d ", Digit, fact);

return 0;

}

(thank you very much btw)

I completed question (a) with the C code below, but I am

Write C programs to do the following: 1. (a) Write a function, int factorial (int n ), which returns n ! (the factorial of n, i.e. 123n.) (b) Using int factorial (int n ) above, write a C program to compute 2!1+3!2+4!3+5!4+6!5+ (c) Show the assembler output when n=10

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!