Explore BrainMass

Explore BrainMass

    Examples and use of Loops in programming language

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Argue the advantages, disadvantages, and provide usage examples of the following:

    For Next Loops

    Do While Loops

    Do Until Loops

    © BrainMass Inc. brainmass.com March 4, 2021, 6:09 pm ad1c9bdddf
    https://brainmass.com/computer-science/java/examples-loops-programming-language-32105

    Solution Preview

    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 ...

    Solution Summary

    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.

    $2.19

    ADVERTISEMENT