Selection Process If … then … else...
Condition Process 2 Process 1 Y
Condition Process 1 Process 3 N
Condition Process 2 Process 1 Process 3 Y (then) N (else) If … then … else...
n>=0 Y Readln(n) Writeln(‘Positive’) Readln(n); If n >= 0 then Writeln(‘Positive’)
n>=0 N Readln(n) Writeln(‘Negative’) else Writeln(‘Negative’)
n>=0 Y Readln(n) Writeln(‘Positive’) N Writeln(‘Negative’) Readln(n); If n >= 0 then Writeln(‘Positive’) else Writeln(‘Negative’);
Selection Process If … then …
Condition Process 2 Process 1 Y If (Condition is T) then Process 2
Condition Process 1 N Process 2 If (Condition is T) then Process 2