Write a program that accepts input (through stdin) as a string of unary numbers delimited by spaces, and prints the equivalent string of numbers in binary, decimal, and hexadecimal. These unary symbols are allowed:
- stroke,
'/'
or'\'
- Decimal
1
- ASCII
'I'
- ASCII
'-'
Your program does not have to support all symbols, but it must use at least one. Zero should be represented as simply two spaces (the lack of unary symbols)
e.g. if the input is
Test Cases:
Input:
1 11 111 1111111111
Example Output:
1 2 3 10
1 2 3 A
1 10 11 1010
Output must be to standard output. If no standard output is available, use whatever output logging stream is available.
It does not have to print the converted strings in any particular order; it must print the binary, hexadecimal, and decimal string equivalents, but it does not have to print in that specific order.
This is code-golf, so shortest program wins!