5 lines
160 B
Ruby
5 lines
160 B
Ruby
require 'scanf'
|
|
p dec1.scanf("%d") # => [123459]
|
|
p hex2.scanf("%x") # => [180154659]
|
|
p oct3.scanf("%o") # => [4009]
|
|
# no scanf specifier for binary numbers.
|