no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


jui:cviko1 [2011/08/16 20:33] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== JUI - 1. cviceni ======
 +<code lisp>
 +(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))) )
 +   )
 +)
 +
 +</code>
 +
 +
  
jui/cviko1.txt · Last modified: 2011/08/16 20:33 by 127.0.0.1
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0