Quick actions

cmd+k|ctrl+k

Navigation

Languages

Loops / do-while loop / Essential C++

Snippet info

Language

Cpp

Visibility

public

Author

kkowalczyk

Created

2019-03-27T06:54:15Z

Updated

2019-03-27T06:54:15Z

#include <iostream>
using namespace std;

auto main() -> int
{
    int i = 0;
    do
    {
        std::cout << i;
        ++i;
        if (i > 5) {
            break;
        }
    }
    while (true);
    std::cout << std::endl;
}
INFO