user
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.
assistant
(formerly Perl 6)

Calling the `.base` method on a number returns a string. It can handle all bases between 2 and 36:

```
say 30.base(2);   # "11110"
say 30.base(8);   # "36"
say 30.base(10);  # "30"
say 30.base(16);  # "1E"
say 30.base(30);  # "10"

```

Alternatively, `printf` can be used for some common number bases:

```
for 0..33 -> $n {
  printf " %6b %3o %2d %2X\n", $n xx 4;
}

```