Apple interview question

Solve fizz buzz programming test.