[Solved] Me not understanding do while loops [closed]

[ad_1]

If the number input isn’t one that you check (1 to 5) then you hit:

else if (a == 1) {
    std::cout << "\n";
    return 1;
}

which will enter the if (because a is 1), print a new line and return from main ending your run.

[ad_2]

solved Me not understanding do while loops [closed]