- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Includes
Certificate & Practice Material
Programs for practice
In the program below, we've introduced beginers to programming in C
Source Code: Program to find the factorial using recursion
# Program to find the factorial using recursion in C #include<stdio.h> int fact(int n); int main() { int n; printf("Enter a positive integer: "); scanf("%d", &n); printf("Factorial of %d = %ld", n, fact(n)); return 0; } int fact(int n) { if (n >= 1) return n*fact(n-1); else return 1; }Output
Run the program to see the OUTPUT