Handle Score
@Ibrahim Nash 6454
@blackshadows 6380
@mb1973 5710
@Quandray 5245
@akhayrutdinov 5111
@saiujwal13083 5046
@sanjay05 3762
@kirtidee18 3709
@mantu_singh 3556
@marius_valentin_dragoi 3523
@sushant_a 3459
Complete Leaderboard
Decimal to binary
Basic Accuracy: 64.89% Submissions: 1333 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