0% found this document useful (0 votes)
38 views19 pages

Q2 W6 D2 Algorithm

Uploaded by

aldrin.almendral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views19 pages

Q2 W6 D2 Algorithm

Uploaded by

aldrin.almendral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

FLOWCHART

OBJECTIVES:
• Define flowchart.
• Identify the different symbols
use in flow chart.
• Identify the advantages of
flowchart.
• 4. Cite examples of
algorithm using flowchart.
FLOW CHART

A graphical representation of a
computer program in relation to its
sequence of functions.
It is a diagram that shows the
sequence of steps or actions needed to
perform a process.
Flow chart use special shapes or
symbols to represent different types of
actions or steps in a process.
It is a diagram which visually presents
the flow of data through processing
systems. This means by seeing a flow chart
one can know the operations performed
and the sequence of these operations in a
system.
A flowchart, will describe the
operations (and in what sequence) are
required to solve a given problem. You can
see a flow chart as a blueprint of a design
you have made for solving a problem.
NAME SYMBOL FUNCTION

An oval indicates the


START/END starting or ending of a
process
Represents a set-up to
PREPARATION another step in the
process (for sub-program
or function)
INPUT/OUTPUT A parallelogram represent
input or output
PROCESS A rectangle presents a
steps in your process
NAME SYMBOL FUNCTION

DECISION A diamond indicates a decision

It is used as connecting point


when the flowchart
ON necessitates using more than
PAGE / one page or refers to a
OFF PAGE complicated subroutine that
would be impossible to contain
on the main flowchart page.
It indicates the direction of flow
ARROWS of instruction.
EXAMPLES
START
Problem 1:
Find the value of Input Price,
Tax_Rate
Sales Tax.
Sales_Tax = Price *
Tax_Rate
Type of Control
Structure: Print Sales_Tax

Sequential
END

Analysis: Display the computed value of Sales Tax


EXAMPLES
START

Problem 2: Enter the


value of A and
Find the greater B

number between T If A > F

two numbers. B

Print A Print “A”


Type of Control
Structure: Selection
END

Analysis: Once the condition is TRUE, it will show


the value of variable A otherwise, display the
character A
EXAMPLES START

Problem 3: Enter num1,


num2 and
Get the summation num3

of three numbers Sum = num1 + num2

using the variables + num3

num1, num2 and


num3. If the T If
Sum == A
F

summation is A,
print “Correct”,
otherwise print Print
“Correct
Print
“Wrong
“Wrong”. A = 10 ” ”

END
START
EXAMPLES
Problem 4: Integer count

Print “Hello World” 10


times Print “Hello
World”

Interpretation: count = count +1


0 Hello World
1 Hello World T
If count
2 Hello World <5

3 Hello World F

4 Hello World END

5
ADVANTAGES OF USING FLOW
CHART

Flow chart is used for representing algorithm


(steps) in pictorial form. This pictorial
representation of a solution/system is having
many advantages.
1) Communication: A Flowchart can be used as
a better way of communication of the logic of
a system and steps involve in the solution, to
all concerned particularly to the client of
system.
2) Effective analysis: A flowchart of a problem
can be used for effective analysis of the
problem.
3) Documentation of Program/System:
Program flowcharts are a vital part of a good
program documentation. Program document is
used for various purposes like knowing the
components in the program, complexity of the
program etc.
4) Efficient Program Maintenance: Once a
program is developed and becomes
operational it needs time to time
maintenance. With help of flowchart
maintenance become easier.
5) Coding of the Program: Any design of
solution of a problem is finally converted into
computer program. Writing code referring the
flowchart of the solution become easy.
ACTIVITIES

Algorithm A
Add 4 to 5
Print the result

Algorithm B
Ask the user to type in a whole number
Add 5 to that number
Print the result
Algorithm C
If 4 is less than 5
Add 5 to 4
Print the result Otherwise Print "no“

Algorithm D
Ask the user to type in a whole number
If the number typed in is less than 5
Add 5 to the number typed in
Print the result Otherwise Print "no"
Referenc
es
https://www.visual-paradigm.com/tutorials/flowchart-tutorial
/

https://creately.com/blog/diagrams/flowchart-guide-flowchart
-tutorial/
Thank you!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy