Factorial

#include<iostream.h>
#include<conio.h>
void main();
{
clrscr();
int fact=1,no;
cout<<"Enter the number";
cin>>no;
for(i=1;i<=no;i++)
{
fact=fact*i;
}
cout<<"the factorial of the inputed number is:"<<fact;
getch();
}


0 comments:

Post a Comment