#include<stdio.h>
#include<conio.h>
void factorial(int num);
void main()
{
int num;
clrscr();
printf("\n enter the number");
scanf("\n %d",&num);
factorial(num);
getch();
}
void factorial(int num1)
{
int fact=1,i;
for(i=1;i<=num1;i++)
{
fact=fact*i;
}
printf("\n factorial is %d",fact);
}
#include<conio.h>
void factorial(int num);
void main()
{
int num;
clrscr();
printf("\n enter the number");
scanf("\n %d",&num);
factorial(num);
getch();
}
void factorial(int num1)
{
int fact=1,i;
for(i=1;i<=num1;i++)
{
fact=fact*i;
}
printf("\n factorial is %d",fact);
}