Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun doomy (broj)
- (rekurzija broj 1 2)
- )
- (defun rekurzija (broj arg1 arg2)
- (cond
- ((eq broj 1) 1)
- ((eq broj 2) arg2)
- ((and (evenp broj)(> broj 2))(rekurzija (- broj 1) arg2 (+ arg1 arg2 1))) ;;rekurzijava go prenesvit rezultat ko arg2
- ((and (oddp broj)(> broj 1))(rekurzija (- broj 1) arg2 (+ arg1 arg2 )))
- )
- )
- (print (doomy 11))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement