Loops In C++:
A loop is used for executing a block of statements repeatedly until a particular
condition is satisfied. For example, when you are displaying number from 1 to 100 you may want set the value of a variable to 1 and display it 100 times,
increasing its value by 1 on each loop iteration.
Types Of Loops In C++
Do While Loop
The initialization statement describes the starting point of the loop, where the loop variable is initialized with a starting value. A loop variable or counter is simply a variable that controls the flow of the loop. The test expression is the condition until when the loop is repeated.
In every programming language including C++, loop is a process of repeating a group of statements until a certain condition is satisfied. While loop is an entry controlled loop where the condition is checked at the beginning of the loop. The condition to be checked can be changed inside it.
Do While Loop: