#include<iostream>
using namespace std;
int anik(int a)
{
if(a == 1)
return 1;
else
return a * anik(a - 1);
}
int main()
{
int n, b;
cout << "Enter A Number : ";
cin >> n;
cout << endl;
b = anik(n);
cout << "Factorial :: " << b << endl;
return 0;
}
using namespace std;
int anik(int a)
{
if(a == 1)
return 1;
else
return a * anik(a - 1);
}
int main()
{
int n, b;
cout << "Enter A Number : ";
cin >> n;
cout << endl;
b = anik(n);
cout << "Factorial :: " << b << endl;
return 0;
}
Comments
Post a Comment