0% found this document useful (0 votes)
5 views

Algorithm and Pseudocode

The document discusses algorithms, pseudocode, and flowcharts. It defines algorithms and pseudocode, provides examples of each, and compares the differences between algorithms and pseudocode. It also discusses the importance of algorithms and pseudocode in programming.

Uploaded by

Ludwig Luzano
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Algorithm and Pseudocode

The document discusses algorithms, pseudocode, and flowcharts. It defines algorithms and pseudocode, provides examples of each, and compares the differences between algorithms and pseudocode. It also discusses the importance of algorithms and pseudocode in programming.

Uploaded by

Ludwig Luzano
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

ALGORITHM

AND
PSEUDOCODE
By: Jay Rupert L. Yasis
Learning Objectives

1 2 3
Differentiate algorithm Write Appreciate the
and pseudocode. pseudocode/algorithm importance
based on the given of algorithm and
task. pseudocode.
Identify Me
• Identify the
elements and
symbols of
flowchart
describes in
each statement.
1. What is the
element of
flowchart
used to
represent the
start and end
of the
program?
2. What is the
element of
flowchart used to
represent the
logical test of the
program?
3. What is the
flowchart symbol
used to connect
the flowchart to
another part of
the same page?
4. What is the
flowchart
symbol used to
represent the
program flow?
5. What is the
flowchart
symbol used to
represent the
decision?
Arrange Me
Arrange the
flowchart on
how to log in to
Facebook
account.

This Photo by Unknown author is licensed under CC BY.


• A sequence of steps
to solve a given
problem.
What is an
• An algorithm follows
Algorithm? a systematic and a
logical approach,
where the procedure
is defined step-wise.
1. Start from the
leftmost element of
arr[] and one by one
compare x with each
element of arr[].
Algorithm
of linear 2. If x matches with an
element, return the
search : index.

3. If x doesn’t match
with any of elements,
return -1.
What is a Pseudocode?

It represents an
It can be written in a
algorithm to solve a
format that is similar to
problem in natural
the structure of a high-
language and
level programming
mathematical
language.
notations.
Pseudocode for linear search
Difference Between Algorithm and Pseudocode
Difference Between Algorithm and Pseudocode
Difference Between Algorithm and
Pseudocode
Let's
Reflect!
•In your own
opinion, why
writing algorithm
and pseudocode
are essential in
programming?
Let’s Apply
Using the given flowchart,
write its corresponding
Algorithm.
Let’s Apply
Using the given flowchart,
write its corresponding
algorithm and pseudocode.
Adding Two Integers (Algorithm)
1.Declare variable A, B, and Sum.
2.Enter the value for variable A and B.
3.Find the sum by adding variable A
to variable B.
4.Display the sum.

You might also like