Questions: Factorial Program in C. To find Factorial of a number using C Program. C program to find factorial of a given number. Factorial of a number in C. Program to find factorial using recursion.

Factorial of a number

Factorial of a number is represented by the symbol “!” and for any real positive number “n” it is written as “n!” where n! = 1 * 2 * 3 * …. * n. Here we will learn program for finding factorial of a number using C.


Required Knowledge and Software

 C Programming Operator
 C Programming Variable and C Programming expression
 C Programming Data Type
 C if statement
 C Programming for loop 
C Programming software Dev C++ /Turbo C++ 

Check: Flowchart for Factorial of a number

Logic to find factorial of a number in c programming 

Algorithm for finding factorial of a number with detailed explanation were discussed below:
  1. Input a number and store it in a variable say "num".
  2. Initialize another variable that will store factorial say "fact".
  3. Run loop from 1 to num.
  4. Multiply the current loop counter value.
Check: Area of triangle ; Flowchart for area of triangle

   Program to find factorial of a number

int find_factorial(int);
int num, fact;
 //Ask user for the input and store it in num
 printf("\nEnter any integer number:");

 //Calling our user defined function
 fact =find_factorial(num);
   //Displaying factorial of input number
 printf("\nfactorial of %d is: %d",num, fact);
   return 0;
 //Factorial of 0 is 1
 //Function calling itself: recursion


Enter any integer number: 5
Factorial of 5 is : 120