Thenali raman Story "logical thinking in Java"

yaswanth krishna - Feb 24 - - Dev Community
package hlo;

public class While {
    public static void main(String[]args) {
        int thenali=1024;
        int solider=thenali-1;
        int count=0;
        while(solider>=1) {
            solider=solider/2;
            count=count+1;
        }

        System.out.println(count);

        }

    }





Enter fullscreen mode Exit fullscreen mode

output:
10

. . . . . . . . . . . . . . . . . . . . . . . .