From a03973653262fbbfed7ce42dfa39646d16bdc98f Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 21 Jun 2024 00:25:55 +0100 Subject: while loops, comparisons, modulo, fizzbuzz --- "fizzbuzz.b\303\276" | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 "fizzbuzz.b\303\276" (limited to 'fizzbuzz.bþ') diff --git "a/fizzbuzz.b\303\276" "b/fizzbuzz.b\303\276" new file mode 100644 index 0000000..e70c2c1 --- /dev/null +++ "b/fizzbuzz.b\303\276" @@ -0,0 +1,10 @@ +(do + (set n 1) + (while (< n 30) + (print + (if (= 0 (% n 5)) + (if (= 0 (% n 3)) "fizzbuzz" "buzz") + (if (= 0 (% n 3)) "fizz" n))) + (set n (+ n 1)))) + + -- cgit v1.2.3