|
|||
Simple Base Conversion
In this problem, you are asked to write a simple base conversion program. You will be given a
hexadecimal or decimal integer number as input. You will have to output the corresponding
decimal or hexadecimal number. Hexadecimal numbers always start with
“
Input SpecificationThe input contains several lines of input. Each line contains a single non-negative number, which may be a decimal or hexadecimal number as explained in the problem statement. The decimal value of this number will be less than 231. A line containing a negative decimal number terminates the input. This number should not be processed. Input numbers will contain no space within them. Output Specification
For each line of input (except the last one), produce one line of output. This line should
contain the decimal or hexadecimal representation of the corresponding hexadecimal or decimal
number. Like in the input, hexadecimal numbers in the output should be preceded by
“ Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 03/01/2019 |