Convert given number to any base with maximum fours in it - Java Quiz Question


Write a program to convert a given number to any base such that the number of fours in that converted number is maximum.

Input (int) Output (int)
769 1044
444 444
68 44
-568 -2344



class ConvertToBaseWithMaxFours
{
    public static void main(String s[])
    {
        int input = 769;
        System.out.println("After converting number into base with max fours we get " + convertToOtherBase(input));

    }


    public static int convertToOtherBase(int input) {
    }
    

}