31 lines
358 B
Plaintext

import log
import sys
main() {
fizzbuzz(15)
}
fizzbuzz(n) {
x := 1
loop {
switch {
x % 15 == 0 { print("FizzBuzz", 8) }
x % 5 == 0 { print("Buzz", 4) }
x % 3 == 0 { print("Fizz", 4) }
_ { log.number(x) }
}
x += 1
if x > n {
return
}
print(" ", 1)
}
}
print(address, length) {
sys.write(1, address, length)
}