Find Factorial of Number Using Recursion

#include<stdio.h>
#include<conio.h>
int fact(int);
void main()
{
 int x,n;
 printf("nEnter the value of n :");
 scanf("%d",&n);
 x=fact(n);
 printf("n%d",x);
 getch();
}
int fact(int n)
{
 if(n==0)
  return(1);
 return(n*fact(n-1));
}

Share this

Related Posts

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer