C & C++ Programming
Computer ScienceChapter 3 — Conditional Statements and Loops
Lesson 3.5 : break, continue and Nested Loops
Reading & Interactive Lesson
break, continue and Nested Loops
Reading Material & Notes
Loop Control Statements
C and C++ provide control statements for changing normal loop execution.
break
The break statement immediately terminates a loop.
continue
The continue statement skips the current iteration and continues with the next iteration.
Nested Loops
for(int i = 1; i <= 3; i++)
{
for(int j = 1; j <= 3; j++)
{
printf("* ");
}
printf("\n");
}
Nested loops are commonly used for tables, patterns and two-dimensional data.
Course Curriculum
10 Chapters • 50 Lessons
Chapter 1 — Introduction to C and C++
5 Lessons
Chapter 2 — Variables, Data Types and Operators
5 Lessons
Chapter 3 — Conditional Statements and Loops
5 Lessons
Chapter 4 — Functions and Modular Programming
5 Lessons
Chapter 5 — Arrays and Strings
5 Lessons
Chapter 6 — Pointers and References
5 Lessons
Chapter 7 — Structures, Unions and Enumerations
5 Lessons
Chapter 8 — Object-Oriented Programming in C++
5 Lessons
Chapter 9 — Inheritance, Polymorphism and Templates
5 Lessons
Chapter 10 — File Handling and Mini Projects
5 Lessons