Pergunta de entrevista da empresa Bloomberg

Changing base of a number

Resposta da entrevista

Sigiloso

30 de ago. de 2010

do successive divides to change bases. (1) do a modulo divide of the target number by the base number. Write the result as the most significant. (2) get the quotient of the target number divided by the base number. (3) use the quotient in (2) as the target number and repeat steps (1) and (2) until the quotient is zero and the remainder is the most significant of the result.

1