Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun fib ( n &optional (a 1) (b 0))
- (if (= n 0)
- a
- (fib (- n 1) b (+ a b))))
- ;; le argumento para FIB do teclado
- (setq a (read-line))
- ;; escreve na tela e analisa um inteiro para FIB
- (write (fib (parse-integer a)))
Advertisement
Add Comment
Please, Sign In to add comment