Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Homework number 4 - fibonacci sussquences.

Name: Anonymous 2010-01-19 4:00

Consider the generalized fibonacci sequences:
4, 1, 5, 6, 11, 17, 28, ...
3, 2, 5, 7, 12, 19, 31, ...
Write a program that takes two numbers as input and prints as many Sussmans as the tenth number in the resulting fibonacci sequence.
USE RECURSION.

Name: Anonymous 2010-01-21 16:44


(defun fib (n)
           (cond ((< n 2) 1)
                 ((print 'sussssman)
                  (+ (fib (- n 1))
                     (fib (- n 2))))))


(I have clearly made the program better by
      (printing the fibonacci number
           ((preceded by the number of whole predecessors the said number has) each of which is replaced by sussmen)))
(recursively of course).)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List