// ****************************************************************** // BaseConversion.java // // Recursively converts an integer from base 10 to another base // ****************************************************************** import java.io.*; public class BaseConversion { public static void main (String[] args) throws IOException { BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in)); int base10Num; int base; System.out.println (); System.out.println ("Base Conversion Program"); System.out.print ("Enter an integer: "); base10Num = Integer.parseInt(keyboard.readLine()); System.out.print ("Enter the base: "); base = Integer.parseInt(keyboard.readLine()); // Call convert and print the answer } // -------------------------------------------------- // Converts a base 10 number to another base. // -------------------------------------------------- public static String convert (int num, int b) { int quotient; // the quotient when num is divided by base b int remainder; // the remainder when num is divided by base b } }