create hexadecimal numbers - base 16 - by prefacing them with 0x : Number Literal « Number « Ruby






create hexadecimal numbers - base 16 - by prefacing them with 0x


puts 0xddff

 








Related examples in the same category

1.Make number easier to read by using underscores every three digits from the right
2.Create floating-point numbers simply by using a decimal point
3.Create an exponent
4.Create binary numbers by prefacing them with 0b
5.Create octal number - base eight - numbers by prefacing them with a 0
6.Add commas to a big integer value