int n = 33; int s = 0; while (n > 0) { s += n % 2; n /= 2; } System.out.println(s);
Login in to like
Login in to comment
or Read more about Java Quizzes
Login in to like
Login in to comment