I figured it out. When the method Factorial is run just once, the correct value is attained. Because Factorial returns the value of finFact, when Factorial is run again it keeps the previous value of...
Type: Posts; User: thedman3
I figured it out. When the method Factorial is run just once, the correct value is attained. Because Factorial returns the value of finFact, when Factorial is run again it keeps the previous value of...
Thank you for the small tips.
This program is intended to create a Pascal's triangle, for example:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
... etc
That is not the output that is produced. Instead, if...
I wrote a pascal's triangle program with an imbedded 'for' loop and a Factorial class that computes the factorial of a number. When it gets to the third line of the triangle the problems arise. If...