You are on page 1of 8

Decision Flowcharting

Lecture 5
PROGRAMMING 1

Engr. Jennelyn P. Cabale


Tasks

Pre Task Draw.io

While Task Lecture Demonstration

Post Task Exercises

Engr. Jenn P. Cabale Lecture 5 – DECISION FLOWCHARTING 2


Objectives
• Apply decision making in flowcharting

• Write and analyze programs using conditional symbols

Engr. Jenn P. Cabale Lecture 5 – DECISION FLOWCHARTING 3


Decision Application
• Decision application in flowcharting is implemented using a decision symbol.

• It is the sole symbol in flowcharting that has the ability to perform relational
operations that can filter conditions to arrive at a decision.

• It has a single input and two-output choices characteristic.

• The two-output characteristics of the symbol is the filtering stage of a program


that determines if the set condition in the decision symbol is either TRUE or
FALSE.

Engr. Jenn P. Cabale Lecture 5 – DECISION FLOWCHARTING 4


Examples:
1. Create a flowchart that will accept two integers. If the integers are
equal, print the sum of the integers, otherwise print the product.

2. Create a flowchart that will input unique integers for A, B, and C and
print the highest integer.

Engr. Jenn P. Cabale Lecture 5 – DECISION FLOWCHARTING 5


Switch
• Switch provides the decision symbol the path where the program should
pass. It also drives and forces a program to execute processes to meet
unique problem requirements. The implementation of switch id through
variables. Variable is used to set a condition in the decision symbol.

Engr. Jenn P. Cabale Lecture 5 – DECISION FLOWCHARTING 7


Example:
1. Enter 10 numbers and print the highest and the lowest number.

2. Enter 10 numbers and print the 7th number and the sum of the 8th, 9th,
and 10th numbers.

Engr. Jenn P. Cabale Lecture 5 – DECISION FLOWCHARTING 8


THE END

You might also like