+ 1

Code Help!

I wrote this code that gives the max number of 0's between two 1's in the binary representation of an integer (it's explained in the code file). It was working fine but when I tried other numbers it got some answers wrong. What am I doing wrong? https://code.sololearn.com/cA22A11a26A0/?ref=app

9th Apr 2021, 6:18 PM
Sena Tunca
Sena Tunca - avatar
4 Respuestas
9th Apr 2021, 7:02 PM
RKK
RKK - avatar
0
thanks to you all!
9th Apr 2021, 8:10 PM
Sena Tunca
Sena Tunca - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //your code goes here } }
23rd Nov 2021, 9:15 AM
Arjun Reddy
0
This is answer please
23rd Nov 2021, 9:15 AM
Arjun Reddy