//************************************** // Name: Decimal To Octal Converter in Java // Description:This simple program will ask the user to give a number and then our program will convert the given number by the user into octal equivalent. The program is very easy to understand and use. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. // By: Jake R. Pomperada // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** decimal_octal.java package hello; import java.util.Scanner; public class decimal_octal { public static void main(String args[]) { Scanner input = new Scanner(System.in); int values = 0; System.out.println("Decimal To Octal Converter in Java"); System.out.println(); System.out.print("Enter a Number : "); values = input.nextInt(); String octal_value = Integer.toOctalString(values); System.out.println("The Octal Value is : " + octal_value + "."); System.out.println(); System.out.println("\t End of Program"); } }