#include <iostream.h>
#include <conio.h>
int factorial (int i); //Declaration (Prototype)
void main( )
{
int a, fact;
cout<<"\n Enter any Number : " ;
cin>>a;
fact = factorial( a ) ;
cout<<"\n Factorial value : " << fact ;
getch( );
}
int factorial ( int x)
{
int f =1, i ;
for (i = x; i >= 1; i--)
f = f * i ;
return (f );
}
1 comments:
Thank you for the good writeup. It in fact was a
amusement account it. Look advanced to more added agreeable from you!
By the way, how can we communicate?
Here is my homepage ... cellulite treatment reviews
Post a Comment