View Single Post
Old Jul 27th, 2007, 4:52 AM   #10
357mag
Hobbyist Programmer
 
Join Date: Mar 2005
Posts: 148
Rep Power: 4 357mag is on a distinguished road
Difficult to see. Very. Since you really can't see the calculations. All I see is the chain of function calls. And someone posted:

4 * factorial( 3 )
4 * 3 * factorial( 2 )
4 * 3 * 2 * factorial( 1 )
4 * 3 * 2 * 1
4 * 3 * 2
4 * 6
24

4 * 3 is not the same as 4 * factorial(3). I see the compiler always calling the function but I don't see the 4 * 3 * 2 * 1.
357mag is offline   Reply With Quote