+ 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; } } }

13th Feb 2021, 12:55 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
2 Respostas
+ 2
This is not working.
15th Feb 2021, 12:17 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
13th Feb 2021, 7:24 PM
Devesh Ratan