Sequential means that program flow moves from one statement to the next, that statement moves to the next, and so on. It is the simplest form of structures, and it is not likely that a programmer will use sequential structuring when developing complex programs.
Selection (decision)
Selection structures make decisions and perform commands dependent upon the decision. Selection structures involve "if statements" which are basically statements like "if this, then do that" and "if not this, then do that". With "if statements", we can also include "nested if statements", which are "if statements" inside other "if statements". Another form of selection structures is called a "switch statement", which is very efficient for certain situations but not others. "Switch statements" focus on the value of a particular variable and perform different "cases" accordingly.
Repetition
Repetition structures are used when something needs to be repeated a certain number of times through the use of a "loop". A loop is simply a statement that completes iterations or cycles until a certain value is reached. Once the test expression has been met, execution moves to the next executable statement. For instance, if you were to ask the user to enter ten values to find the average of the numbers, you could write a loop that would continue letting the user enter numbers until ten numbers had been entered.
Answers & Comments
Verified answer
Sequential
Sequential means that program flow moves from one statement to the next, that statement moves to the next, and so on. It is the simplest form of structures, and it is not likely that a programmer will use sequential structuring when developing complex programs.
Selection (decision)
Selection structures make decisions and perform commands dependent upon the decision. Selection structures involve "if statements" which are basically statements like "if this, then do that" and "if not this, then do that". With "if statements", we can also include "nested if statements", which are "if statements" inside other "if statements". Another form of selection structures is called a "switch statement", which is very efficient for certain situations but not others. "Switch statements" focus on the value of a particular variable and perform different "cases" accordingly.
Repetition
Repetition structures are used when something needs to be repeated a certain number of times through the use of a "loop". A loop is simply a statement that completes iterations or cycles until a certain value is reached. Once the test expression has been met, execution moves to the next executable statement. For instance, if you were to ask the user to enter ten values to find the average of the numbers, you could write a loop that would continue letting the user enter numbers until ten numbers had been entered.
hftr