• Factorial Program in C
    C Programming

    Factorial program in C using For Loop and Recursion

    In my last post i have explained Fibonacci series in c programming using for loop and recursion. Now i am going to explain about Factorial program in c using for loop and recursion both way, so you will have idea about how same program can be written using different logic. What is Factorial of a number? In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5! = 5x4x3x2x1 = 120 Factorial program in C programming using For Loop #include <stdio.h> int main() { int c, n, fact = 1; printf("Enter a number…