C Program to find sum of two numbers
printf("Enter a number:");
printf("Factorial of number %d is:%d",num,fact);
The above program will find out the factorial of the given number. The program takes an integer value from user and assigns that value in the variable 'number' and further it assigns a number one-less than the value present in number variable in another variable num. While loop will be executed till the number does not become less than 0.In the loop we will calculate the factorial of given number. We can understand this process by given example:
So factorial of number 4 is equal to 24.