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
Factorial program in C++ using for Loop
#include<iostream.h> #include<conio.h> void main() { int i, no, fact=1; clrscr(); cout<<"Enter the any no. : "; cin>>no; for(i=1;i<=no;i++) { fact=fact*i; } cout<<"Factorial: "<<fact; getch(); }