SlideShare a Scribd company logo
REPETITION STRUCTURES Lecture 1.10
Prepared by: Mian Saeed Akbar
REPETITION STRUCTURES
Repetition Structures
while structure
 Makes loop continuation test at beginning
 Loop body may or may not executes depending on the condition
do/while structure
 Similar to while structure
 Makes loop continuation test at end, not beginning
 Loop body executes at least once
for structure
 Makes loop continuation test at beginning
 Loop body may or may not executes depending on the condition
while ( condition )
{
statement
}
do {
statement
} while ( condition );
for(initialization; condition; update)
{
statement
}
Thank you
Please subscribe my channel for more videos
and courses

More Related Content

PDF
Lecture 1.3 A Simple Program to Print a Line of Text.pdf
PDF
Lecture 2.8 Arrays.pdf
PDF
Lecture 2.2 Default Arguments.pdf
PDF
Lecture 2.6 Function Templates.pdf
PDF
Lecture 2.4 Recursion.pdf
PDF
Lecture 3 Structures in C++.pdf
PDF
Lecture 2.5 Function Overloading.pdf
PDF
Lecture 1.11 Break and Continue Statements.pdf
Lecture 1.3 A Simple Program to Print a Line of Text.pdf
Lecture 2.8 Arrays.pdf
Lecture 2.2 Default Arguments.pdf
Lecture 2.6 Function Templates.pdf
Lecture 2.4 Recursion.pdf
Lecture 3 Structures in C++.pdf
Lecture 2.5 Function Overloading.pdf
Lecture 1.11 Break and Continue Statements.pdf

More from MianSaeedAkbar1 (12)

PDF
Lecture 2.1 Functions.pdf
PDF
Lecture 1.5 Variables.pdf
PDF
Lecture 1.2 Basics of a typical C++ Environment.pdf
PDF
Lecture 2.3 Inline Function.pdf
PDF
Lecture 1.8 Conditional Structures.pdf
PDF
Lecture 2.7 Type Conversion in C++.pdf
PDF
Lecture 1.6 Arithmetic and Relational Operators.pdf
PDF
Lecture 1.7 C++ Keywords.pdf
PDF
Lecture 1.4 Escape Sequence.pdf
PDF
Lecture 1.9 Switch Structure.pdf
PDF
Lecture 0 Object Oriented Programming.pdf
PDF
Lecture 1.1 Introduction to Computer Languages.pdf
Lecture 2.1 Functions.pdf
Lecture 1.5 Variables.pdf
Lecture 1.2 Basics of a typical C++ Environment.pdf
Lecture 2.3 Inline Function.pdf
Lecture 1.8 Conditional Structures.pdf
Lecture 2.7 Type Conversion in C++.pdf
Lecture 1.6 Arithmetic and Relational Operators.pdf
Lecture 1.7 C++ Keywords.pdf
Lecture 1.4 Escape Sequence.pdf
Lecture 1.9 Switch Structure.pdf
Lecture 0 Object Oriented Programming.pdf
Lecture 1.1 Introduction to Computer Languages.pdf

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Complications of Minimal Access Surgery at WLH
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Institutional Correction lecture only . . .
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Supply Chain Operations Speaking Notes -ICLT Program
102 student loan defaulters named and shamed – Is someone you know on the list?
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Complications of Minimal Access Surgery at WLH
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Final Presentation General Medicine 03-08-2024.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Microbial diseases, their pathogenesis and prophylaxis
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Institutional Correction lecture only . . .
STATICS OF THE RIGID BODIES Hibbelers.pdf
Anesthesia in Laparoscopic Surgery in India
Supply Chain Operations Speaking Notes -ICLT Program

Lecture 1.10 Repetition Structures.pdf

  • 1. REPETITION STRUCTURES Lecture 1.10 Prepared by: Mian Saeed Akbar
  • 2. REPETITION STRUCTURES Repetition Structures while structure  Makes loop continuation test at beginning  Loop body may or may not executes depending on the condition do/while structure  Similar to while structure  Makes loop continuation test at end, not beginning  Loop body executes at least once for structure  Makes loop continuation test at beginning  Loop body may or may not executes depending on the condition while ( condition ) { statement } do { statement } while ( condition ); for(initialization; condition; update) { statement }
  • 3. Thank you Please subscribe my channel for more videos and courses