开发者

print hexadecimal representation of an int

i am looking for a pseu开发者_JAVA百科docode that prints the hexadecimal represenation of an integer as string.

thanks!


  • Take the remainder of the integer modulo 16
  • Convert the remainder to a hex digit
  • Place the hex digit into the left-most position in the output string
  • Divide the integer by 16
  • Repeat the above until the value is zero
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜