Right Click to Search

Saturday, July 24, 2024

Find Factorial of Number Using Recursion


#include<stdio.h>
#include<conio.h>
int fact(int);
void main()
{
 int x,n;
 printf("\n Enter 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));
}
Recursive Function : [ Click Here ]

Tags / Keywords : |

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates