+ 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
4 Answers
+ 4
Here's an idea
https://code.sololearn.com/cG52tysjrSNF/?ref=app
0
thanks to you all!
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
}
}
0
This is answer please