What is loop, while loop, for loop, do while loop, multiple initialization loop, nested loop

Publicado el: 11 julio 2020
en el canal de: Rezoana Ahmed Samira
49
2

In computer programming, a loop is a sequence of instructions that is continually repeated until a certain condition is reached. Typically, certain process is done, such as getting an item of data and changing it, and then some condition is checked such as whether a counter has reached a prescribed number. If it hasn’t, the next instructions in the sequence is an instruction to return to the first instruction in the sequence and repeat the sequence. If condition has been reached, the next instructions “falls through” to the next sequential instruction or branches outside the loop. A loop is a fundamental programming idea that is commonly used in writing programs. There are three types of loop.
While loop
For loop
Do while loop

1.While loop syntax:

Initialization expression;
While( termination condition)
{
statements;
increment / decrement;
}


For loop syntax;

2.For(initialization expression; termination condition; increment/decrement)
{
body of the loop;
statements;
}

3. Do while loop syntax:

Initialization expression;
do{
Statements;
Increment/decrement;
}while(termination condition);

4. Nested loop syntax:

For(initialization expression;condition; inc / dec)
{
for(initialization exp;condition; inc / dec)
{
statements;
}
}
1st for loop is called outer loop and next for loop is called inner loop.

mail address: rezoanasamira@gmail.com


En esta página del sitio puede ver el video en línea What is loop, while loop, for loop, do while loop, multiple initialization loop, nested loop de Duración hora minuto segunda en buena calidad , que subió el usuario Rezoana Ahmed Samira 11 julio 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 49 veces y le gustó 2 a los espectadores. Disfruta viendo!