+ 4
What's wrong with this code?
import java.util.Scanner; //your code goes here public class Program { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); System.out.print(Converter.toBinary(x)); String binary=""; while(num>0){ binary = (num%2)+binary; num /=2; } } }
2 Respostas
+ 2
This is not working.
0
Refer to my code
https://code.sololearn.com/cRhEfse0Tzp5/?ref=app