#include<iostream>
using namespace std;
int main()
{
unsigned int N;
cout << "Enter the number to get its factorial: ";
cin >> N;
long double fact=1;
for( int i=N ; i>=1 ; i-- )
fact *=i;
cout << "The factorial of "
<< N
<< " is: "
<< fact
<< endl;
return 0;
}
No comments:
Post a Comment