Question d’entretien chez Imagine Communications

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