lib/baseconv.rb
def represent(number, in_base:)
    digits = ""

    while number > 0
      digits = CHARS[number % in_base] + digits
      number = number / in_base
    end

    digits
  end
# Value to Representation
#
# Convert a positive number n to its digit representation in base b.
Value to Representation
Convert a positive number n to its digit representation in base b.
Value to Representation Convert a positive number n to its digit representation in base b .
def represent(number, in_base:)
    digits = ""
    while number > 0
      digits = CHARS[number % in_base] + digits
      number = number / in_base
    end
    digits
  end
def represent ( number , in_base : ) digits = "" while number > 0 digits = CHARS [ number % in_base ] + digits number = number / in_base end digits end
Value to Representation
Convert a positive number n to its digit representation in base b.
Value to Representation Convert a positive number n to its digit representation in base b .
number
in_base