This topic is going to explain about selection and iterative statements.
Before that, control structure is a control statement and the statements whose execution it controls.
Selection statements provide the means of choosing between two or more paths of execution. It have 2 general categories: two-way selectors and multiple-way selectors
Two-selectors is when “IF” function is used, the program will going to choose which is true or false. Whilst the multiple-way selectors can be in form of “switch case” in which the selectors will be listed depending on the case.
Iterative statements is a statement to do repetition of some task that may be done with iteration or recursion. This may called looping. Following are the categories of looping:
Counter-controlled Loops : Loop that use counter as the limit. When the counter has reached the end, it will stop. Like the use of “for”
Logically controlled loops : loop that use boolean expression to work. When the condition is true or false, it will end the looping.
User-Located Loop Control : Loop that will end the programmers decided to end it. It’s like when there is “break”, it is used to stop a loop.