C++ Programming Code Examples C++ > Recursion Code Examples Factorial Using Recursion Program Factorial Using Recursion Program 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, 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720 /* Program For Factorial Value Using Recursion In C++ */ #include<iostream> #include<conio.h> using namespace std; //Function long factorial(int); int main() { // Variable Declaration int counter, n; // Get Input Value cout << "Enter the Number :"; cin>>n; // Factorial Function Call cout << n << " Factorial Value Is " << factorial(n); // Wait For Output Screen getch(); return 0; } // Factorial recursion Function long factorial(int n) { if (n == 0) return 1; else return (n * factorial(n - 1)); }