The hexadecimal number system is a base 16 number system. It uses 16 digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A(10), B(11), C(12), D(13), E(14), F(15)
Write a method that converts a given hexadecimal number to decimal a decimal number.
Your solution doesn't count if you use the built in String#to_i
method and
base in a base of 16, like this:
'5A5A5A'.to_i(16)
9
5A
CC
9
90
204