#include
int fact (int);
main()
{
int no, result;
printf("enter number:");
scanf("%d",&no);
result=fact (no);
printf("result is :%d",result);
}
fact (x)
{
int rec;
if(x==0)
return 1;
rec=x*fact(x-1);
return rec;
}
Sunday, February 15, 2009
Find Factoral Using Recrusive Funtion
Posted by
BADTNC
at
5:19 AM
Labels: C Programming
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment