UVa 10473 - Simple Base Conversion

10473 - Simple Base Conversion

 * http://acm.uva.es/p/v104/10473.html

Summary
Given a decimal of a hexadecimal number denoted by '0x' output hex for decimal number and decimal for hex number

Explanation

 * Read in the line as a string and parse it.

Implementations

 * Using atoi in the c library is a big plus.

Gotchas
ANY negative number ends input.

Input
2147483647 4 7 44 0x80685 -1

Output
0x7FFFFFFF 0x4 0x7 0x2C 525957