Please enable JavaScript.
Coggle requires JavaScript to display documents.
4.0 Looping Statements - Coggle Diagram
4.0 Looping Statements
-
• Looping is a sequence of instructions that is continually repeated until a certain condition is reached.
• A loop is a way of repeating a statement a number of times until some way of ending the loop occurs.
-
-
-
-
-
-
• A WHILE loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition.
-
-
• A DO-WHILE loop is a control flow statement that executes a block of code at least once and then repeatedly executes the block or not depending on a given Boolean condition at the end of the block.
-
-
-
• Using a label, a Goto Statement can also create a loop by jumping backwards to a label though this is generally discouraged as a bad programming practice.
-
-
-
• The while statement is used to carry out looping operations, in which a group of statement is executed repeatedly until some condition has been satisfied.
-
-
-
• In C programming, break is used in terminating the loop immediately after it is encountered.
• The break statement can be used in terminating all three loops FOR, WHILE and DO-WHILE loops.