diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-21 00:25:55 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-21 00:25:55 +0100 |
commit | a03973653262fbbfed7ce42dfa39646d16bdc98f (patch) | |
tree | fcf222d1e67b715af8173fda8edcab3b6c0793cd /fizzbuzz.bþ | |
parent | f331192861d8ba02af7fd47f2e0c6d6db7515007 (diff) |
while loops, comparisons, modulo, fizzbuzz
Diffstat (limited to 'fizzbuzz.bþ')
-rw-r--r-- | fizzbuzz.bþ | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fizzbuzz.bþ b/fizzbuzz.bþ new file mode 100644 index 0000000..e70c2c1 --- /dev/null +++ b/fizzbuzz.bþ @@ -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)))) + + |