fizzbuzz.nim 190 B

123456789101112131415
  1. # Fizz Buzz program
  2. const f = "Fizz"
  3. const b = "Buzz"
  4. for i in 1..100:
  5. if i mod 15 == 0:
  6. echo f, b
  7. elif i mod 5 == 0:
  8. echo b
  9. elif i mod 3 == 0:
  10. echo f
  11. else:
  12. echo i