Greatest Common Divisor: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

17 November 2023

  • curprev 15:5315:53, 17 November 2023Gneale talk contribs 651 bytes +651 Created page with "===== Return to: Chialisp ===== ===== Return to: Recursive Functions ===== (mod (num1 num2) (defun remainder (x y) (r (divmod x y))) (defun gcd (num1 num2) (if (= num2 0) num1 (gcd num2 (remainder num1 num2)))) (gcd num1 num2) ) ==Example Usage== brun '(a (q 2 4 (c 2 (c 5 (c 11 ())))) (c (q (a (i (= 11 ()) (q . 5) (q 2 4 (c 2 (c 11 (c (a 6 (c 2 (c 5 (c 11 ())))) ()))))) 1) 6 (divmod 5 11)) 1))' '(99..."