Why?

In other modules, we have explored sequences, conditional statements and loops. Although each type of statements has its application, they are not sufficient to express most algorithms by themselves.

Most algorithms involve the use of nesting. In other words, we can enclose a statement or statements by another statement. A sequence can enclose a loop, a loop can enclose a conditional statement, and etc. In fact, there is limitation as to what kind of statement can embed what kind of statement. Indeed, a loop and embed another loop!



Tak Auyeung 2007-09-14