+ 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 Answers
+ 2
This is not working.
15th Feb 2021, 12:17 AM
ā¤ļøšŸ˜PreranašŸ˜ā¤ļø
ā¤ļøšŸ˜PreranašŸ˜ā¤ļø - avatar
13th Feb 2021, 7:24 PM
Devesh Ratan