Handle Score
@Ibrahim Nash 5725
@blackshadows 5685
@akhayrutdinov 5111
@mb1973 4989
@Quandray 4908
@saiujwal13083 4156
@sanjay05 3762
@marius_valentin_dragoi 3511
@sushant_a 3453
@KshamaGupta 3318
@the_coder95 3302
Complete Leaderboard
Decimal to binary
Basic Accuracy: 62.66% Submissions: 391 Points: 1

Given a decimal number N, compute its binary equivalent.

Example 1:
Input: N = 7
Output: 111


Example 2:
Input: N = 33
Output: 100001


Your Task:
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.


to report an issue on this page.


We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?


All Submissions

My Submissions:

Login to access your submissions.

Decimal to binary

Output Window