public String convert(int decNum, int newBase) {
    String str = Integer.toString(decNum, newBase);
    return str; // IT HAS TO RETURN STRING FOR ANY BASE ABOVE 10.
}

Post a Comment

 
Top