Created
April 26, 2020 05:26
-
-
Save cindywu/4c79c78d3c2494444e7803c4482c69a4 to your computer and use it in GitHub Desktop.
crackle-pop
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
(define count 1) | |
(define (crackle-pop count n) | |
(cond ((and (= 0 (remainder count 3))(= 0 (remainder count 5))) (display "CracklePop\n")) | |
((= 0 (remainder count 3))(display "Crackle\n")) | |
((= 0 (remainder count 5))(display "Pop\n")) | |
(else (display count)(display "\n"))) | |
(if (> n count) (crackle-pop (+ count 1) n))) | |
(crackle-pop count 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment