Frage im Vorstellungsgespräch bei Imagine Communications

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