Break Statement

A break Statement breaks out of the loop at the current point or we can say that it terminates the loop condition.

It is represented by break;

The Code:

New Project (91)

 

The Output of Your Program:

New Project (92).png

 

Continue Statement

A Continue statement jumps out of the current loop condition and jumps back to the starting of the loop code.

It is represented by continue;

 

The Code:

New Project (93).png

The Output of Your Program:

New Project (94)

Prev Lesson:        Next Lesson:

The for loop      Logical Operators