Translation of numbers

How do I transfer a number from decimal number system to octal?

Alex Hrom wrote in post #1048155:

How do I transfer a number from decimal number system to octal?

How about this: 100.to_s(8) # => “144” of course 100.to_s(2) is
“1100100”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs