You are here

Selection Control Structures Example 10.12: pseudocode: If then Else

19 January, 2016 - 11:41
If age  >  l7   Display a message indicating you can vote. Else   Display a message indicating you can't vote. Endif 
media/image25.png
Figure 10.14 If then Else control structure  

Example 10.13: pseudocode: Case

Case of age  0 to 17 Display "You can't vote."  18 to 64 Display "Your in your working years."  65 + Display "You should be retired."Endcase
media/image26.png
Figure 10.15 Case control structure