Skip to content
Quiz · Loops · lesson 3 of 8

Quiz — an unsigned countdown

What happens when you build and run this program?

C++
#include <iostream>

int main() {
    unsigned i = 2;
    while (i >= 0) {
        std::cout << i << '\n';
        --i;
    }
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way