[Practice][Functions] Convert Decimal to Binary, Octal and Hexadecimal


Submit solution

Points: 15
Time limit: 0.5s
Memory limit: 2M

Author:
Problem type
Allowed languages
C

Problem Definition

Implement 3 functions decimalToBinary, decimalToOctal, decimalToHexadecimal to convert a given decimal number (>0) to Binary, Octal, and Hexadecimal.

Test Data

Sample Input 1

-1

Sample Output 1

Error: Value should be greater than 0

Sample Input 2

2023

Sample Output 2
Binary equivalent: 11111100111
Octal equivalent: 3747
Hexadecimal equivalent: 7E7

Comments

There are no comments at the moment.