Created
June 30, 2011 22:36
-
-
Save rubydubee/1057463 to your computer and use it in GitHub Desktop.
Base Converter gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This program shows various ways of writing 100 | |
require 'base_converter' | |
bc = BaseConverter.new | |
(2..36).each do |num| | |
x = bc.dec_to_base(num,100) | |
puts "100 in base-#{num} is written as #{x}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment