Saturday, 9 June 2012


#include<stdio.h>
int fact(int a)
{
 int f;
if(a==0)
return 1;
else
f=fact(a-1)*a;
return f;
}

int main(void)
{
 int a;
printf("enter the no");
scanf("%d",&a);
printf("Factorial=%d",fact(a));
}


0 comments:

Post a Comment

Blogroll

Blogger templates

About