Biorhythms: Difference between revisions
Content added Content deleted
(→{{header|Common Lisp}}: also print age in days) |
(→{{header|Common Lisp}}: simplify) |
||
Line 120: | Line 120: | ||
(defun print-bio (y1 m1 d1 y2 m2 d2) |
(defun print-bio (y1 m1 d1 y2 m2 d2) |
||
( |
(let ((diff (diffday y1 m1 d1 y2 m2 d2))) |
||
(setq len 23 nm "physical" diff (diffday y1 m1 d1 y2 m2 d2)) |
|||
(format t "Age in days: ~D ~%" diff) |
(format t "Age in days: ~D ~%" diff) |
||
(print-cycle diff |
(print-cycle diff 23 "physical") |
||
( |
(print-cycle diff 28 "emotional") |
||
(print-cycle diff |
(print-cycle diff 33 "intellectual")))</lang> |
||
(setq len 33 nm "intellectual") |
|||
(print-cycle diff len nm) |
|||
))</lang> |
|||
{{output}} |
{{output}} |
||
<pre>* (print-bio 1972 7 11 1943 3 9) |
<pre>* (print-bio 1972 7 11 1943 3 9) |