C++ programming : Factorial of a number
This Program will show you how to Find a Factorial of any Number using C++ Language
Program # 1 : How to find a Factorial of a Number :
#include <iostream>
using namespace std;
int main()
{
int a, num, fact = 1;
cout << "Enter the Number To Find Its Factorial: \n";
cin >> num;
for(a=1; a<=num; a++)
fact = fact*a;
cout << "The Factorial of Number is: \n" << fact << endl;
return 0;
}
Post a Comment
Please Don't Spam You are allowed to comment your website link