Iterative Factorial

The factorial of an integer, number, greater than or equal to 0, can be calculated iteratively (nonrecursively) by using a for statement as follows:

factorial = 1;
for ( unsigned int counter = number; counter >= 1; --counter )
   factorial *= counter;

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.18.61