Iteration Constructs

Iteration Constructs

Iteration is the ability of a programming language to allow the user to repeat the execution of a certain set of statements again and again until a requirement or condition is satisfied. This structure helps the programmer to perform a particular task again and again ā€˜Nā€™ number of times. . Iteration is also termed as looping.

  1. Conditional looping :

Many programs require that a group of consecutive instructions be executed repeatedly until some logical condition has been satisfied. The required number of repetitions will not be known in advance

  1. Unconditional looping :

Here the execution of a group of consecutive instructions is repeated some specified number of times.

Example : Draw a flowchart to print first 10 natural numbers

Selection_Constructs_3


Example :Draw a flowchart to print first 20 even numbers

Selection Constructs 4

Last modified: Tuesday, 8 November 2011, 6:25 AM