#include <stdio.h>

#include <conio.h>

int factorial(int);

void main()

{

int n;

clrscr();

printf("Enter Number: ");

scanf("%d",&n);

printf("Factorial of %d is %d",n,factorial(n));

getch();

}

int factorial (int m)

{

if(m==0||m==1) return 1;

return m*factorial(m-1);

}

#include <conio.h>

int factorial(int);

void main()

{

int n;

clrscr();

printf("Enter Number: ");

scanf("%d",&n);

printf("Factorial of %d is %d",n,factorial(n));

getch();

}

int factorial (int m)

{

if(m==0||m==1) return 1;

return m*factorial(m-1);

}

## No comments:

## Post a Comment