Given a decimal number N, compute its binary equivalent.
Input: N = 7
Input: N = 33
You dont need to read input or print anything. Complete the function toBinary() which takes the decimal number N as input parameter and returns its binary equivalent.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still
want to view the editorial?
Login to access your submissions.