In C++ loop is used to perform specific repetitive tasks until a condition is satisfied.

TYPES OF LOOPS

1.FOR LOOP
for ( variable initialization; condition; variable update ) {
   // Code to execute while the condition is true
}

2. WHILE LOOP
while ( condition )
{
    // Code to execute while the situation is true
};

3. DO-WHILE LOOP
do {
} while ( condition );

Suggest An Answer

No suggestions avaliable!