Decimal to Octal Conversion [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Decimal Conversion error I am writing a program for a class and is having trouble figuring how to convert an octal number to an decimal number. Here is what I been trying to do so far: import java.util.Scanner; public class test { public static void main ( String args[]) { Scanner input = new Scanner(System.in); System.out.print("Enter number: "); int oct = input.nextInt(); int d2count = 0; int result=0; int