Since I doubt anybody else is going to do it, here is an implementation in Scheme
(define (fib n) (define (fib-iter a b count) (if (= count n) b (fib-iter (+ a b) a (+ count 1)))) (fib-iter 1 0 0))
Tested for values of n up to 10001.
n
10001
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Since I doubt anybody else is going to do it, here is an implementation in Scheme
Tested for values of
n
up to10001
.