C Program to find Factorial of a Number

#include<stdio.h>

#include<conio.h>
void main()
{
clrscr();
int i,fact=1,n;

printf(“enter the number”);
scanf(“%d”,&n);

for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf(“the factorial of thee number is %d”,fact);

getch();
}

Leave a Reply