C++ Program to Find Factorial of a Numberdownload C++ source code fileHere, I used "for loop" . 'for' loop is also used when an statement is executed many times, like 'while' or 'do -while' loop, but 'for' loop is used when we know how many times the statement is to be repeated.
syntax:
for( initialization; condition; update)
{
statement1;
statement2;
}
for a single statement, no need of curly braces.
Comments