Table of Contents

JUI - 1. cviceni

(defun soucet (x y)
     (cond ((eq x 0) y)
           ( T (+ 1 (soucet (- x 1) y) ) )
     )
)
 
 
(defun rozdil (x y)
     (cond ( (eq y 0) x)
           ( T (- (rozdil x (- y 1)) 1)) 
     )
)
 
(defun mensirovno (x y)
    (cond ( (eq x 0) t) 
          ( (eq y 0) NIL) 
          (t (mensirovno (- x 1) (- y 1)))
    )
)
 
(defun soucin (x y) 
   ( cond ( (eq x 1) y) 
          ( t (soucet (soucin (- x 1) y) y)) )
)
 
(defun mocnina (x y)
   (cond ((eq y 0) 1) 
         (t (soucin x (mocnina x (- y 1))) )
   )
)
jui/cviko1.txt · Last modified: 2011/08/16 22:33 (external edit)
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0