C & C++ language
Home
HTML
C&C++ language
Movies
Games
Softwares
Tuesday, 4 September 2012
Find factorial of any number...
#include<iostream.h>
#include<conio.h>
void main()
{
int fact=1,i,n;
cout<<"enter any no. ";
cin>>n;
for(i=1;i<=n;i++)
{
fact=fact*i;
}
cout<<fact;
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment