Tuesday, April 30, 2013

Convert Decimal to Octal in Java


convert decimal number octal java




import java.io.*;
import java.lang.*;

public class DecimalToOctal {
  public static void main(String[] args) throws IOException{
  BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
  System.out.println("Enter the decimal number:");
  String deci = buff.readLine();
  int value = Integer.parseInt(deci);
  String str = Integer.toString(value,8);
  System.out.println("octal:=" + str);
  }
}

run:
Enter the decimal number:
16
octal:=20



------------------------------------------------------

java - Decimal to Octal Conversion
Converting Decimal to Binary Java
built-in Java classes/methods to convert between binary, decimal
Convert Decimal to Octal,Decimal to Octal Conversion,Decimal to
How do i convert a decimal number to octal?
Help With Decimal To Octal Conversion - Java
Converting Decimal To Octal In Vim - Java
Convert Decimal Number To Octal Number - Java
Code Java Convert Decimal To Binary - Java
Octal To Decimal Conversion - Java
Convert Decimal to Octal : Integer
How to convert decimal to binary, octal and hex String in Java
Convert decimal integer to octal number example
Convert Decimal to Binary No.
Searches related to java Convert Decimal to Octal
convert decimal number octal java
java program that converts binary to decimal
java program to convert octal to decimal
how to convert decimal to hexadecimal in java
how to convert decimal to integer in java
octal to decimal java code
program to convert octal to binary in java
convert integer to octal

No comments:

Post a Comment