0% found this document useful (0 votes)
7 views1 page

Control Structure 1

The document describes three types of control structures in programming: sequential, conditional, and iterative. Sequential control executes code line by line, conditional control determines execution flow based on conditions, and iterative control repeats code blocks until a condition is met. Examples for each structure include arithmetic operations, user authentication, and input validation respectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Control Structure 1

The document describes three types of control structures in programming: sequential, conditional, and iterative. Sequential control executes code line by line, conditional control determines execution flow based on conditions, and iterative control repeats code blocks until a condition is met. Examples for each structure include arithmetic operations, user authentication, and input validation respectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Sequential control structure

Sequential control structure can be described as a line by line execution of a code statement. In this
structure, the code is executed one after the other, line by line in the order the code statement appears.

Examples:

Calculation (Arithmetic operation)

Reading a file

Outputting a string

Conditional control structure

This control structure can be used to control the flow of a code execution based on certain conditions.
The results in one of two possible outcomes, true or false also known as Boolean values. (E.g IF/ELSE)

Examples:

User Authentication

Voters Registration (Nationality and Eligible age check)

Iterative control structure

Iterative can be described as repetitive control or loop. In this control structure, a block of code is
executed repetitively until a certain state is met. (E.g For loops, while loops).

Examples:

Input Validation

Searching and sorting

You might also like