Baney chakraborty

Followers

Examples of Looping

Examples of Looping
Suppose you wish to visit the botanical garden, and therefore, are
looking for one of your friends to accompany you. So you take out your
book of few phones and select a likely prospect. Dial the number, make
few talk, and finally invite the friend to visit. If he (or she) accepts the
offer, you have finished your work. If you are refused, then go back and
select another number. These actions are shown in a flow chart in Figure
 The essential concept in this algorithm is the branch back to an
earlier statement to create a loop. A loop is a sequence of instructions
which is repeated several times. Note that each time the programme goes
through the loop a different telephone number is used; the instructions
remain unchanged but the data operated on differs. If you eventually get
an acceptance, you would reach the end block. However, if you keep on
getting rejections, then you re-execute the loop instructions. Since you
only have a finite number of telephone numbers in your book, you must
stop when the data run out.
Share:

No comments:

Post a Comment

Popular Posts

Recent Posts

Sample Text

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Contact me

Software Directory USGeo Web Directory