L8 - Iteration
L8 - Iteration
(Iteration control
structure)
By Sir. Joshua
Introduction
Suppose you want to find the average marks
of each student for a class of 100 students.
Toavoid repetition of performing the same
task, C++ programming languages uses
looping or iteration control structure.
Loopingcontrol manages repeated
executions in a program.
Theloop contains two parts: the body of the
loop and the control statement.
…
Thecontrol statement tests the condition
provided, and it allows the repeated
execution of the statements within the loop
body.
Thereare three types of looping or iteration
used in the C++ programming language;
these are: While loop, Do while loop and
For loop.
While loop