package stack;

import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;

public class NumberToBinary {
    
    public static void IntegerToBinary(Integer n){
        Stack<Integer> stack = new Stack<Integer>();
        while (n > 0) {
           stack.push(n % 2);
           n = n / 2;
        }
        while (!stack.isEmpty())
            System.out.print(stack.pop());
        System.out.println();
    }
    
    public static void main(String[] args) {
        IntegerToBinary(50);
    }
}
