Explore BrainMass
Share

Explore BrainMass

    Selection and Repetition Control Constructs

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

    1. Describe one selection control construct and explain how it works.

    2. Describe one repetition (iteration) control construct and explain how it works.

    © BrainMass Inc. brainmass.com October 10, 2019, 1:21 am ad1c9bdddf
    https://brainmass.com/computer-science/program-execution/selection-repetition-control-constructs-330895

    Solution Preview

    1. One of the selection control constructs available in programming languages is the "IF-ELSE" construct. It is a very commonly used construct in many popular programming languages such as C, C++ and BASIC. Its common form is:

    if (condition1)
    {statement1;
    statement2;
    ...
    statement_n;
    }

    // If multiple selections are required, there will be else-if statements.
    else if (condition2)
    {statement1;
    statement2;
    ...
    statement_n;
    }

    // If there are statements that need to be ...

    Solution Summary

    The expert describes one selection control construct and explains how it works and describes one repetition control construct.

    $2.19