Question 7-2

[8 pts] Consider the following method.

public static void run() {
    int n = IO.readInt();
    for(int i = n; i > 0; i /= 2) {
        IO.print(i % 2);
    }
}

Solution

Back to 8:00 Quiz 7