xxxxxxxxxx
There are mainly two types of loops:
Entry Controlled loops: In this type of loop, the test condition is tested
before entering the loop body. For Loop and While Loop is entry-controlled
loops.
Exit Controlled Loops: In this type of loop the test condition is tested or
evaluated at the end of the loop body. Therefore, the loop body will execute
at least once, irrespective of whether the test condition is true or false.
the do-while loop is exit controlled loop.