Convert-Decimal-to-Binary-Octal-and-Hexadecimal
We have a number in a decimal number, and we have to convert it into a binary, octal, and hexadecimal number. We will use a function for converting decimal numbers to binary numbers, decimal numbers to octal numbers, and decimal numbers to hexadecimal numbers.
Example:
Input: 64
Output:
64 in Binary: 0b1000000
64 in Octal: 0o100
64 in Hexadecimal: 0x40
Input: 312
Output:
312 in Binary: 0b100111000
312 in Octal: 0o470
312 in Hexadecimal: 0x138.