Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
antoineh1
DATE:
May 8, 2016, 2:06 p.m.
FORMAT:
Text only
SIZE:
320 Bytes
Raw
Download
Tweet
HITS:
5091
Go to comments
Report
(defn binom [N K]
(if (or (= K 0) (= N K))
(int 1)
(int (+ (binom (- N 1) (- K 1)) (2))))
)
)
(println (binom 1 2))
(defn binom [N K]
(if (or (= K 0) (= N K))
(int 1)
(int (+ (binom (- N 1) (- K 1)) (((binom (- N 1) (K))))))
)
)
(println (binom 1 2))
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus