Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //There is another class to handle this called Compiler class this class is used to get //ride of using scanner class multiple types for different problems
- //Compiler class just have object of this class-> Question_4 q4 = new Question_4(4);
- public class Question_4(int N){
- Question_4{
- int count = 0;
- int highest = 1;
- for(int i=N; i>0; i++){
- if(N%2==0){
- count++;
- System.out.println(count);
- }
- if(N%2==0){
- System.out.println("Testing purpose I use this println and saw this problem");
- }
- N=N>>1;
- }
- System.out.println(highest);
- }
- }
Add Comment
Please, Sign In to add comment