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 64 times
Edit
0
Community Evaluations
developer avatar
Fafun
02/03/2024
il manque "int" à la ligne (2) 'i=0;'