Programming and Software Development
Friday, April 16, 2010
Factorial of a Number
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,l,f;
f=1;
cout<<"\nenter no.";
cin>>n;
for(l=1;l<=n;l++)
{
f=f*l;
}
cout<<"\nfactorial no is"<<f;
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment