public static void num(String str) { BigInteger a = new BigInteger(str); StringBuffer sb = new StringBuffer(""); StringBuffer n = new StringBuffer(""); while (!(a.divide(div).equals(zero))) { sb.insert(0, (char) (a.mod(div).intValue() + 96)); a = a.divide(div); } sb.insert(0, (char) (a.intValue() + 96)); for (int i = 0; i < str.length(); i++) { if (i % 3 == 0 && i != 0) n.insert(0, ","); n.insert(0, str.charAt(str.length() - i - 1)); } while (sb.length() < 22) sb.append(" "); System.out.println(sb + "" + n); }