ALGORITHM
Control Structures: Selection & Looping Statements
Selection Statements
CASE (Variable) OF Selection
1: Statement 1 Statements
2: Statement 2
3
.
IF (Condition) THEN
.
Statement 1
OTHERWISE
ELSE
Statement
Statement 2
END CASE
ENDIF
Looping Statements
Loop executes
while the condition
REPEAT is false.
Statements
UNTIL (Condition)
Exit Control Loops
Do
Statements Loop executes
WHILE (Condition) while the condition
is true.
Loops
Loop executes
WHILE (Condition) while the condition
is true.
Statements
END WHILE
Entry Control Loops
FOR (Range)
Statements Loop executes
END FOR while the number is
in the range.
Important
No marks for START and STOP
Remember to end the loops and the selection statements.