Factorial of any number is the product of an integer and all the integers below it.For example factorial of 4 is
4! = 4 * 3 * 2 * 1 = 24
#include<stdio.h> #include<conio.h> void main() { int i, no, fact=1; clrscr(); printf("Enter the any no. : "); scanf("%d",&no); for(i=1;i<=no;i++) { fact=fact*i; } printf("Factorial =%d ",fact); getch(); }
Download Code