@@ -0,0 +1,1011 @@
+package thirty_days_of_code;%0D%0A%0D%0Aimport java.util.*;%0D%0A%0D%0A/*%0D%0A * Problem Statement:%0D%0A * For this challenge, convert a given number, n, from decimal (base 10) to%0D%0A * binary (base 2).%0D%0A * %0D%0A * Input Format: %0D%0A * The first line contains a single integer, T, the number of test cases. The T%0D%0A * subsequent lines of test cases each contain a single value, n, the base 10%0D%0A * positive integer to be converted.%0D%0A * %0D%0A * Constraints:%0D%0A * 1 %3C= T %3C= 1000%0D%0A * 1 %3C= n %3C= 231%0D%0A * %0D%0A * Output Format: %0D%0A * For each test case, print the value of n in binary on a new line.%0D%0A * %0D%0A * Sample Input: %0D%0A * 2%0D%0A * 4%0D%0A * 5%0D%0A * %0D%0A * Sample Output: %0D%0A * 100%0D%0A * 101%0D%0A */%0D%0Apublic class BinaryNumbers %7B%0D%0A%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        %0D%0A        Scanner sc = new Scanner(System.in);%0D%0A        %0D%0A        int numCases = sc.nextInt();%0D%0A        for (int i = 0; i %3C numCases; i++) %7B%0D%0A            int num = sc.nextInt();%0D%0A            System.out.println(Integer.toBinaryString(num));%0D%0A        %7D%0D%0A        sc.close();%0D%0A    %7D%0D%0A%7D

Add BinaryNumbers