A loop in computer languages is a set of statements that execute repeatedly, based on some criteria.
In C and C++, the three looping statements are while, do, and for...
while (test-expression)...
for (<init>; <test>; <iterate>) <statement> <init> is executed once. <test> is then executed - if it has value true (!= 0), then <statement> is executed....