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.




foreach ($n in 0..33) {
    "Base 2:  " + [Convert]::ToString($n, 2)
    "Base 8:  " + [Convert]::ToString($n, 8)
    "Base 10: " + $n
    "Base 10: " + [Convert]::ToString($n, 10)
    "Base 10: " + ("{0:D}" -f $n)
    "Base 16: " + [Convert]::ToString($n, 16)
    "Base 16: " + ("{0:X}" -f $n)
}