C++ Break and Continue

C++ Break and Continue

C++ Break and Continue

C++ Break :

In Computer Programming, The break statement terminates loop immediately when it is encountered, Simply comes out of the loop. Immediate after the closing brace of loop will be executed.

The Syntax of the Break statement is as follows:




Output :


C++ Continue:

The continue statement skips some statement inside the loop. Loop will be restarted when continue is encountered.

The Syntax of the continue statement is as follows:


Example :


Output :