View Single Post
Old 17-08-2009, 22:42   #80
danielf
cf.mega poser
 
danielf's Avatar
 
Join Date: Jun 2003
Posts: 16,687
danielf has a golden auradanielf has a golden auradanielf has a golden aura
danielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden auradanielf has a golden aura
Re: Programming Challenges?

Here's my mortgage calculator, using recursion

Spoiler: 

(defun mortgage (balance payment rate months)
(if
(< balance 0)
(print months)
(mortgage (- (+ (* (/ rate 12) balance) balance) payment) payment rate (+ months 1))))


How do you get indentation in the code? My code is indented when I paste it, but I lose indentation in the spoiler tags. Even spaces don't stick...
__________________
Remember kids: We are blessed with a listening, caring government.
danielf is offline   Reply With Quote