Menu
Question Index
...

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) {
    }
    

}

Doubts

Problems

Topic: Java for loops vs Java while loops vs Java do while loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App