WHAT'S NEW?
Loading...

Decimal to Binary


import java.util.*;
class bin
{
 public static void main(String args[])
 {
  Scanner inputobject=new Scanner(System.in);
  System.out.println("Enter a integer number    :");
  int i=inputobject.nextInt();

  System.out.println("After converting binary...");
  System.out.println(i+"  ="+Integer.toBinaryString(i));
 }
}


Post a Comment