A C program to find factorial of a number using recursion

// A C program to find factorial of a number using recursion.

#include<stdio.h>

#include<conio.h>
int factorial(int);
void main(){
clrscr(); int num,fact=0;
printf("Enter an integer number: "); scanf("%d",&num);
fact=factorial(num);
printf("Factorial of %d is = %ld",num,fact);getch();
}
int factorial(int num)
{
if(num<=1)
return 1;
else
return(num*factorial(n-1));
}

Output:



A C program to find factorial of a number using recursion, write a program to find factorial of a number using recursion, my knowledge to you dude, recursion, c program recursion



Nhận xét