The continue Statement
- The continue statement is used inside loop. When a continue statement is encountered inside a loop, control jumps to the beginning of the loop for next iteration, skipping the execution of statements inside the body of loop for the current iteration.
- The continue statement causes an immediate jump to the top of a loop.
- It also sometimes lets you avoid statement nesting.
- The continue statement brings back program control to the start of the loop. You can use it for both ‘for’ and ‘while’ loops.
using namespace std;
for(t=0; t<100; t++)
cout << t << ' ';
//Only even Numbers are printed