many programming problems are solved by repeatedly acting on the same data. two ways to do this are recursion and acting on the same data. two ways to do this are recursion and iteration. iteration means doing the same thing over and over again.
if the primitive days of early computer science, programs were nasty, brutish and short. loops consisted of a label, some statements and a jump that went to the label.
in C++ a label is just a name followed by a colon (;). the label is placed to the left of a legal c++ statement. a jump is accomplished by writing 'gots' followed by the name of a label.
No comments:
Post a Comment