Pregunta de entrevista de Imagine Communications

Fizz buzz coding question. Was also asked to solve without using modulus