Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun fizzbuzz (n)
- (cond
- ((= (% n 15) 0) "FizzBuzz")
- ((= (% n 5) 0) "Buzz")
- ((= (% n 3) 0) "Fizz")
- (t n))) ; => fizzbuzz
- (fizzbuzz 10) ; => "Buzz"
- (fizzbuzz 2) ; => 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement