Aligent interview question

Fizz buzz coding question on whiteboard