Describe one (1) scenario not mentioned in the textbook in which it
would be advantageous for you to use a definite loop as opposed to an
indefinite loop when developing a program. Provide a rationale for your
In definite loop, the number of iterations is known before we start the execution of the body of the loop.
Example: repeat for 10 times printing out *.
In indefinite loops, the number of iterations is not known before we start to execute the body of the loop, but depends on when a certain condition becomes true (and this depends on what happens in the body of the loop)
Example: while the user does not decide it is time to stop, print out * and ask the user whether he wants to stop.
Nov 4th, 2014
Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.