Question from the C++ - Fundamentals test

Write a C++ program that prints 1 1 12 123

Hard

What does the following code display?

int main() {
    int i = 0;
    while (i < 4) {
        int j = 0;
        do {
            cout << ++j;
        } while (j < i);
        i++;
        cout << endl;
    }
    return 0;
}
Author: SamuelStatus: PublishedQuestion passed 90 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!