Skip to main content
1 of 2
Winny
  • 1.1k
  • 9
  • 17

Racket, 125 bytes

(for([x(range 1 101)])(define(m n)(=(modulo x n)0))(displayln(cond[(and(m 3)(m 5))"FizzBuzz"][(m 3)"Fizz"][(m 5)"Buzz"][x])))

Simplest approach, took some work to get it lower than 130 bytes. Inspired by the Java example.

Pretty-printed code

(for ([x (range 1 101)])
  (define (m n)
    (= (modulo x n) 0))
  (displayln (cond
               [(and (m 3) (m 5)) "FizzBuzz"]
               [(m 3) "Fizz"]
               [(m 5) "Buzz"]
               [x])))
Winny
  • 1.1k
  • 9
  • 17