Technicalsymposium.com-Free Email Alerts


Enter Your Email :

Important Note:Login & Check Your Email Inbox and Activate Confirmation Link

Subscribe & Get All Fresher Jobs Information & Study Materials PDF and Projects- Free Download

C Programming Books PDF


C Aptitude Question Papers


Datastructure Programming in C



C Programming & Tech Interview Materials PDF- Free Download

C Program for factorial using recursion.

int fact(int);

void main()

{

int a,b=0,c;

clrscr();

printf("Enter the N value:");

scanf("%d",&a);

while(a<0)

{printf("\n\Enter only positive number.\n");

printf("Enter N value:");

scanf("%d",&a);

}

b=fact(a);

printf("%d",b);

getch();

}

int fact(int x)

{

if(x==0)

{

return(1);

}

else

{

return((x)*(fact(x-1)));

}

}

Download All C Programming & Study Materials PDF