// Diplaying Factorial of a number
// Programmer name: Sohail Ahmed
// Dated: 16/05/2011
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int num;
int fact=1;
cout<<"\nEnter Any num to find Fact: ";
cin>>num;
for(int i=1; i<=num; num--)
{
fact =fact * num;
}
cout<<"\nFactorial of is: "<<fact;
getch();
}
0 comments:
Post a Comment