About us

C Program to find factorial of given number

C Program to find factorial of given number

C-Program-find-factorial-number
#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,f=1;
clrscr();
printf("Enter any number to find factorial\n");
scanf("%d",&n);
 for(a=n;a>1;a--)
 f=f*a;
printf("%d",f);
getch();
}


OUTPUT

Enter any number to find factorial
5
120





You can also visit:-