9 lines
180 B
Common Lisp
9 lines
180 B
Common Lisp
|
|
||
|
(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*)
|