#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int x,i,fact=1;
cout<<"Enter a number :""\n";
cin>>x;
for(i=x;i>0;i--)
{
fact=fact*i;
}
cout<<" The factorial of "<<x<<" is "<<fact<<".\n";
system("pause");
return 0;
}
Dreaming in Digital, Living in Realtime, Thinking in Binary, Talking in IP. WELCOME TO OUR WORLD.
Flash Labels by Way2Hack
Coolstuff Designed by Somesh Chaudhary © 2013 All Rights Reserved.