Base2 number system conversion


Given a number, you need to return a string which has the base 2 representation. Dont use any built-in methods to convert public class Answer implements Base2SystemInterface { @Override public String GetBase2System(int num) { // WRITE YOUR CODE HERE return ; } public static void main(String [] args) { // write code here to test } } Example1: Input: 6 Output:"110" Example2: Input: 16 Output:"10000"

Answer

No comments:

Post a Comment