You are on page 1of 13

Jahan University

Vice Chancellor office


Computer Science faculty
IS/IT Department

Course:Data Structure and Algorithms

Chapter 2 - Lesson 3
Execution Flow
Semester: 8th Instructor : Ziaur Rahman
Lecture: Khalilullah Khalid
Computer Science Faculty
Prepare by: Khalilullah Khalid year: 1402
JAHAN UNIVERSITY
Contents
• Sequential Flow

• Decisional Flow

• Single Alternative, Double Alternative, Multiple Alternative

• Quadratic equation

• Iterative Or Repetitive Flow


Objective & Usage in the Organizations
• To understand Sequential Flow.
• To know about Decisional Flow.
• To overview on Single Alternative, Double
Alternative, Multiple Alternative
• To understand Quadratic equation.
• To be able to work with Iterative Or Repetitive
Flow.
Execution Flow
❑ Flow of execution show in which order statements are executed.
❑ Execution always begins at the first statement of the program.
❑ Following's the types of flows:
❑ Sequential Flow
❑ Decisional Flow
❑ Single Alternative, Double Alternative, Multiple Alternative
❑ Iterative Or Repetitive Flow

1
Sequential Flow

If nothing is specified then the modules the executed in the
sequence in which they are written. Thus in it the modules are
executed one after the other.

The sequence control structure is shown below:

2
Conditional Flow
❑ There are various conditions on the basis of which one module is selected out
of several given modules.

❑ The conditional structures can be divided into following categories:


❑ Single Alternative
❑ Double Alternative
❑ Multiple Alternative

3
Single Alternative:
This is the simplest decision control structure. It includes a statement or block or
statement on the “true” path only.

4
Double Alternative
This type of decision control structure includes a statement or block of statement
on both paths. If condition is true then executes one statement otherwise execute
the fall statement.

5
Multiple Alternative
According to this only one of the modules will
be executed. If condition 1 is true then module
A1 will be executed. Otherwise condition 2 will
be checked. If condition 2 is true then module
A2 will be executed. And so on. If none of the
conditions is true then module B will be
executed. Its flowchart is:

6
Repetitive Flow
In this flow loops are implemented. Loop is used to implement those statements
which are to be repeated again and again until some condition is satisfied. It
implements while and for loops. Each of these begin with Repeat statement

7
Summery & Students Evaluation
• Sequential Flow

• Decisional Flow

• Single Alternative, Double Alternative, Multiple Alternative

• Iterative Or Repetitive Flow


Any Questions?
Next Topic

Array

13

You might also like