The Stack Overflow podcast is back! Listen to an interview with our new CEO.
1 of 7

Fibonacci + Fizz Buzz = Fibo Nacci!

Fibonacci + FizzBuzz = Fibo Nacci!


Your challenge is to create a Fibo Nacci program!

  • A Fibo Nacci program outputs the first 100 Fibonacci numbers (starting from 1).
  • If the Fibonacci number is divisible by both 2 and 3 (i.e. it is divisible by 6), then output FiboNacci instead of the number.
  • Otherwise, if the Fibonacci number is divisible by 2, then output Fibo instead of the number.
  • Otherwise, if the Fibonacci number is divisible by 3, then output Nacci instead of the number.

Rules

  • The program should take no input.
  • The program should output a new line (\n) after every entry.
  • The program should not print anything to STDERR.
  • The program must output the first 100 Fibo Nacci entries (starting from 1).
  • Standard loopholes are not allowed (by default).
  • This is so shortest code in bytes wins!

Here is a sample output for the first 12 numbers:

1
1
Fibo
Nacci
5
Fibo
13 
Nacci
Fibo
55
89
FiboNacci