There are 3 types of selection structures:-
1) If...else
2) Switch
3) Nested
Nested is a combination of same or different selection structures. Switch concept is quite different but the purpose is still same as if...else.
Format like this:
__________________________
switch(variable){
case (option 1):
.....
.....
break;
case (option 2);
.....
.....
break;
default:
____________________________
Extra notes and exercises can be downloaded:-
>>>>https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BxksBzCNS-ZtMjMwYzhkMTItN2M1YS00YjdkLTlhZjMtZDhiZTNiZjI0YTBi&hl=en_US
1) If...else
2) Switch
3) Nested
Nested is a combination of same or different selection structures. Switch concept is quite different but the purpose is still same as if...else.
Format like this:
__________________________
switch(variable){
case (option 1):
.....
.....
break;
case (option 2);
.....
.....
break;
default:
____________________________
Extra notes and exercises can be downloaded:-
>>>>https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0BxksBzCNS-ZtMjMwYzhkMTItN2M1YS00YjdkLTlhZjMtZDhiZTNiZjI0YTBi&hl=en_US
No comments:
Post a Comment