PPT Slide
1.35
N! = N•N-1• . . . •1 = N(N-1)!
(defun factorial (N)
(cond
((eql N 0) 1)
((eql N 1) 1)
(T (* N (factorial ( - N 1))))
))
(factorial 3)
(* 3 (factorial 2))
(* 2 (factorial 1))
1
2
6
Can you prove by induction that ( factorial N ) produces N! for N ? O ?
Previous slide
Next slide
Back to first slide
View graphic version