Programming languages often have built-in routines to convert a non-negative integer for printing in different number bases. Such common number bases might include binary, Octal and Hexadecimal.



Task

Print a small range of integers in some different bases, as supported by standard routines of your programming language.



Note

This is distinct from Number base conversion as a user-defined conversion function is not asked for.)

The reverse operation is Common number base parsing.




object Main extends App {
  val radices = List(2, 8, 10, 16, 19, 36)
  for (base <- radices) print(f"$base%6d")
  println(s"""\n${"-" * (6 * radices.length)}""")
  for (i <- BigInt(0) to 35; // BigInt has a toString(radix) method
       radix <- radices;
       eol = if (radix == radices.last) '\n' else '\0'
  ) print(f"${i.toString(radix)}%6s$eol")
}