Imagine Communications interview question

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