From f86caf6b5f914c6435dd2cf54d60456935ab5572 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 6 Apr 2021 23:00:00 +0200 Subject: [PATCH] Add example fizzbuzz --- examples/fizzbuzz.lisp | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 examples/fizzbuzz.lisp diff --git a/examples/fizzbuzz.lisp b/examples/fizzbuzz.lisp new file mode 100644 index 0000000..605dcd8 --- /dev/null +++ b/examples/fizzbuzz.lisp @@ -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))))