2017-04-11 01:33:08
package Perevod;
 
public class Perevod {
	public static void binar(int j){
		byte i = 0,b;
		boolean a=true;
		while (j!=0){
			b=(byte) (j%2);
			if(b%2==1){i++;}
			System.out.println(b);
			j=(byte)(j/2);
 
		}
		System.out.println();
		System.out.println(i);
	}
 
	public static void main(String[] args) {
		binar(9);
 
 
	}
 
}
Invalid Email or Password