@@ -0,0 +1,324 @@
+package homework;%0A%0Apublic class CountOfBitsOne %7B%0A%09public static int Count(int number) %7B%0A%09%09String numberBits = Integer.toBinaryString(number);%0A%09%09char%5B%5D bits = numberBits.toCharArray();%0A%09%09%0A%09%09int result = 0;%0A%09%09%0A%09%09for (int i = 0; i %3C bits.length; i++) %7B%0A%0A%09%09%09if (bits%5Bi%5D == '1') %7B%0A%09%09%09%09result++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09return result;%0A%09%7D%0A%7D%0A

add CountOfBitsOne