Execute statements repeatedly is called loop/iterative statement.
Loops are 3 types
- Simple Loop
- While Loop
- For Loop
- While Loop: While is used to check the condition first and enter into the loop to
executes statements again and again given in
` between loop..end loop..
Syntax: BEGIN statement(s); while <condition> Loop statement1; statement2; .... .... END Loop; statement(s); END; All the statements are repeated given in loop...end loop until the condition is false.
Example: Develop a program to print 1-10 numbers
Example: Develop a program to print 10-1 numbers