Add example fizzbuzz
This commit is contained in:
parent
8e6929c0a9
commit
f86caf6b5f
1 changed files with 5 additions and 0 deletions
5
examples/fizzbuzz.lisp
Normal file
5
examples/fizzbuzz.lisp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
(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))))
|
Loading…
Reference in a new issue