Handout #1 An example of Nested IF statements: get x if (x >= 0) then if (x < 50) then put "F" else if (x < 60) then put "D" else if (x < 70) then put "C" else if (X < 80) then put "B" else if (x <= 100) then put "A" else put "ERROR: x > 100" end if end if end if end if end if else put "ERROR: x < 0" end if Note: 1) This is more efficient in 2 ways from the previous algorithm - only checks one side of the condition - the other side is implicit if you reach this point - exits after you reach a true condition 2) Use of indentation - "correct" but hard to read and see meaning