Created
April 30, 2010 06:50
-
-
Save wmeister-old/384854 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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