...

/

Example 67: Decimal to Binary Conversion

Example 67: Decimal to Binary Conversion

Learn how to convert a decimal number into its binary equivalent.

Problem

Write a function that takes a positive decimal integer as a parameter and prints its binary equivalent on the console. Also, check for negative input and return 0 in such a case.

Example

...