Argue the advantages, disadvantages, and provide usage examples of the following:
For Next Loops
Do While Loops
Do Until Loops
Loops are used to do repetitive work in a program.
Any loop can be either conditional or unconditional (also known as infinite loops).
A conditional loop terminates when a certain condition becomes true or as long as a certain condition remains true.
Generally, any loop can be suited to any particular problem. However, there are some subtle differences based on
a) when the loop termination condition is checked; it is checked either at the beginning or at the end
b) whether the loop should run while a condition is true or until a condition becomes true. Note, the former is simply the logical negation of the ...
In this solution you will learn a lot about loops used in C, C++, Java, Visual Basic. You will learn: What is a loop and why is it used?
How many different types of loops are there?
What are the advantages of one type of loop over another?
What is a conditional loop and what is an unconditional loop?
You will also see examples of the use of such loops in program fragments.