Quick actions

cmd+k|ctrl+k

Navigation

Languages

Flow control / break, continue, goto / Essential C++

Snippet info

Language

Cpp

Visibility

public

Author

kkowalczyk

Created

2019-03-27T06:53:56Z

Updated

2019-03-27T06:53:56Z

#include <iostream>
using namespace std;

auto main() -> int
{
    int num = 1;
    STEP:
    do {
        if (num % 2 == 0)
        {
            num = num + 1;
            goto STEP;
         }
    
       cout << "value of num : " << num << endl;
       num = num + 1;
    } while( num < 10 );
}
INFO