CommonLispTings/pe1.lisp

9 lines
180 B
Common Lisp
Raw Permalink Normal View History

2023-02-23 21:23:38 +01:00
(defvar *sum* 0)
(loop for x from 1 to 999 do
(if (or (zerop(mod x 3)) (zerop (mod x 5)))
(progn
(setq *sum* (+ *sum* x)))))
(format t "~d ~%" *sum*)