Pergunta de entrevista da empresa Dye & Durham

Write a function to convert a decimal number to binary.