DECISION STRUCTURE
This code is one long sequence structure containing a lot of duplicated code.
There are several disadvantages to this approach, including the following:
• The duplicated code makes the program large.
• Writing a long sequence of statements can be time consuming.
• If part of the duplicated code has to be corrected or changed then the
correction or change has to be done many times.
A repetition structure causes a statement or set of
statements to execute repeatedly.In this course, we will look
at two broad categories of loops: condition-controlled and
count-controlled.