-->
当前位置:首页 > 题库

PROGRAMMING:The hexadecimal number is converted to the corresponding decimal number

Luz5年前 (2021-05-10)题库410
Write a function, input a hexadecimal integer and output the corresponding decimal number. Note negative integers. Among them, a, B, C, D, e and F in hexadecimal number represent 10, 11, 12, 13, 14 and 15 in decimal number respectively.
###Input format:
Enter the hexadecimal number n (no more than 7 bits).
###Output format:
Output the decimal number corresponding to n.
###Input example:
```in
AA51
-FFFF
F1B2
```
###Output example:
```out
forty-three thousand six hundred and one
-65535
sixty-one thousand eight hundred and seventy-four
```







answer:If there is no answer, please comment