Skip to content

Instantly share code, notes, and snippets.

@wmeister-old
Created April 30, 2010 06:50
Show Gist options
  • Save wmeister-old/384854 to your computer and use it in GitHub Desktop.
Save wmeister-old/384854 to your computer and use it in GitHub Desktop.
(defun multiple-of (x y)
(if (= 0 (rem x y)) t))
(defun check-number (x)
(if (multiple-of x 3) (setf answer (+ answer x))
(if (multiple-of x 5) (setf answer (+ answer x)))))
(setf answer 0)
(loop for i from 1 to 999 do
(check-number i))
(print answer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment