J.P. Morgan interview question

FizzBuzz Question during hackerrank assessment