From: Stephen Bloch (sbloch at adelphi.edu) Date: Sat Jan 1 14:05:11 EST 2011 |
|
Another solution, which doesn't require any language features you don't know yet, is to write a helper function that takes in the gross pay and computes the net pay from it. Your main function then calls this new helper function on the result of your "pay" function. The "pay" function is called only once, and your new helper uses the result twice. Stephen Bloch sbloch at adelphi.edu
Posted on the users mailing list. |
|