Stack stack = new Stack(); while (N > 0){stack.push(N % 2);N = N / 2;}for (int d : stack) StdOut.print(d);StdOut.print1n();