@@ -0,0 +1,725 @@
+import java.util.Scanner;%0Aimport java.lang.*;%0Aimport java.util.ArrayList;%0A%0Apublic class decimal_binary_converter %7B%0A%09public static void main(String%5B%5D args) %7B%0A%09%09//directions and user input%0A%09%09Scanner s = new Scanner(System.in);%0A%09%09System.out.println(%22Enter the decimal number you wish to convert to binary%22);%0A%09%09int decimal = s.nextInt();%0A%0A%09%09//calculate%0A%09%09ArrayList%3CInteger%3E binary = new ArrayList%3CInteger%3E();%0A%09%09while(decimal != 0) %7B%0A%09%09%09int binary_digit = decimal%252;%0A%09%09%09binary.add(0, binary_digit);%0A%09%09%09decimal = decimal/2;%0A%09%09%7D%0A%0A%09%09//print result%0A%09%09System.out.println(%22The binary conversion of your number is%22 );%0A%09%09for(int i = 0; i %3C binary.size(); i++) %7B%0A%09%09%09System.out.printf(%22%25d%22, binary.get(i));%0A%09%09%7D%0A%09%09System.out.println();%0A%09%7D%0A%7D%0A

converts decimal numbers to binary