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

PROGRAMMING:JMU Python different base numbers

Luz5年前 (2021-05-10)题库437
Input a decimal integer, output its corresponding octal number and hexadecimal number. The format control of print function is required for output. The octal number should be prefixed with 0o, and the hexadecimal number should be prefixed with 0x.
###Input format:
Enter a decimal integer, for example: 10
###Output format:
Output the corresponding octal number and hexadecimal number, two values separated by two spaces. For example: 0o12 0xa
###Input example:
Here is a set of inputs. For example:
```in
ten
```
###Output example:
The corresponding output is given here. For example:
```out
0o12 0xa
```







answer:If there is no answer, please comment