Well, this is the java code that lets u convert decimal to binary ~ 36-base number.
import java.util.*;
public class Convert
{
public static String convertbase(int n, int base) {
// special case
if (n == 0) return "0";
String digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
String s = "";
while (n > 0) {
int d = n % base;
s = digits.charAt(d) + s;
n = n / base;
}
return s;
}
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter the number base 10 to convert: ");
int original = keyboard.nextInt();
System.out.print("Enter the new base: ");
int base = keyboard.nextInt();
String answer = convertbase(original,base);
System.out.println("The number "+original+"[base 10] = "+answer+"[base "+base+"]");
}
}