Minilisp.pm/examples/fizzbuzz.lisp

6 lines
238 B
Common Lisp
Raw Normal View History

2021-04-06 23:00:00 +02:00
(do ((i 1 (+ i 1))) ((= i 100))
(write-line (cond ((and (zerop (mod i 3)) (zerop (mod i 5))) "FizzBuzz")
((zerop (mod i 3)) "Fizz")
((zerop (mod i 5)) "Buzz")
(t i))))