Sunday, February 20, 2011
Binary to decimal conversion in java
Java code to covert binary number to decimal number
import java.io.*;
class Test {
public static void main(String[] args) throws IOException {
long no,n=0l,j=1,rem,no1;
System.out.println("Enter the binary number");
BufferedReader br=new BufferedReader(new InputStreamReader (System.in));
no=Long.parseLong(br.readLine());
no1=no;
Labels:
Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment