Created
September 21, 2022 12:29
-
-
Save capjamesg/56ca92fe42cfe70a62b74a58a21d48aa to your computer and use it in GitHub Desktop.
An implementation of CracklePop in Lisp.
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 cracklepop (num) | |
(cond | |
((and (= (mod num 3) 0) (= (mod num 5) 0)) "CracklePop") | |
((= (mod num 3) 0) "Crackle") | |
((= (mod num 5) 0) "Pop") | |
(num))) | |
(loop for val from 1 below 100 do (print (cracklepop val))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment