Thursday, October 08, 2009

Factorial Code for VB

Man did I ever just have tough time writing a piece of factorial code. The trick is that it keeps feeding it's result back into itself and that is where it gets the new value. Then it'll keep looping until it reaches your "if" statement that returns a result of 0.
 
What a bitch of a time getting that logic to spit out of my head though!

0 comments:

Followers