Lets Tutorial
Showing posts with label
any
.
Show all posts
Showing posts with label
any
.
Show all posts
Saturday, February 14, 2015
C Program to calculate Factorial of any number
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
unsigned long i,fac,n;
cout<<"Enter Number: ";
cin>>n;
for(i=1,fac=1;i<=n;++i)
{
fac=i*fac;
}
cout<<"Factorial 0f "<<n<<" is: "<<fac;
getch();
}
Read more »
Older Posts
Home
Subscribe to:
Posts (Atom)