Pergunta de entrevista da empresa Bloomberg

Given an integer, print it in a string with proper comma placement. Ex. you're given the integer 1234567 you should print 1,234,567