Files
monkey/examples/fizzbuzz.monkey
Chuck Smith ef8c8f8f04
Some checks failed
Test / build (push) Waiting to run
Build / build (push) Has been cancelled
bitwise operators and boolean operators
2024-03-23 10:00:02 -04:00

19 lines
258 B
Plaintext

#!./monkey-lang
test := fn(n) {
if (n % 15 == 0) {
return "FizzBuzz"
} else if (n % 5 == 0) {
return "Buzz"
} else if (n % 3 == 0) {
return "Fizz"
} else {
return str(n)
}
}
n := 1
while (n <= 100) {
print(test(n))
n = n + 1
}