Flowchart and C program to find the factorial of a given number.

Flowchart :


Program :

#include<stdio.h>
#include<conio.h>
void main()
{ int f,a,p=1;
clrscr();
printf("Enter any number :\t");
scanf("%d",&f);
for(a=f;a>0;a--)
p=p*a;
printf("Factorial of a given number = %d",p);
getch();
}

Output :



Comments