class DecimalToBinary { public static void main(String[] args) { int num=13; String bin=""; while(num>0) { bin=(num%2)+bin; num=num/2; } System.out.println(Integer.parseInt(bin)); } } Output Read more