Decimal to binary
Submissions: 4787   Accuracy:

40.23%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a decimal number. Write a program to convert it into equivalent binary number.

Input:
First line of input contains a single integer T which denotes the number of test cases. First line of each test case contains a single integer N which represents a decimal value.

Output:
For each test case, print the binary equivalent of the given decimal value N.

Constraints:
1 <= T <= 103
1 <= N <= 103

Example:
Input:

3
7
10
33
Output:
111
1010
100001

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal
Author: harsh.agarwal0


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.