Algorithm Sing
Transcript of Algorithm Sing
8/20/2019 Algorithm Sing
http://slidepdf.com/reader/full/algorithm-sing 1/5
Topic Flow chart
Sub Topic Algorithms and Flowcharts
Summary Discussing flow chart symbols, and describing flowcharts using a
few examples
8/20/2019 Algorithm Sing
http://slidepdf.com/reader/full/algorithm-sing 2/5
Flowcharts
A flowchart is the combination of geometric symbols connected with arrows that represent
steps in a process.
Flowchart Symbols
Note: All symbols are not necessary to have a complete flowchart.
Example 1
Hero s formula for calculating the area of a triangle with the length of the three sides as a, b,
!
Flowline
Terminal
Decision
Ofpage Connector
Processing
Connector
Prede ned Process
Annotation
Input/Output
Loop
Used to connect sym ols andindicate t!e "ow o# logic$
Used to represent t!eeginning or end o# a tas%$
Used #or logic o# comparisonoperations$
Used to indicate t!at t!e"owc!art continues to asecond page$
Used #or arit!metic and datamanipulation operations$
Used to &oin diferent "owlines$
Used to represent a group o#statements t!at per#orm oneprocessing tas%$
Used to pro'ide additionalin#ormation a out anot!er"owc!art sym ol$
Used #or input and outputoperations$
Used #or loops
8/20/2019 Algorithm Sing
http://slidepdf.com/reader/full/algorithm-sing 3/5
"he function e x can be calculated by using the following infinite #aclaurin series
........$%$&$!
'%&!
+++++= x x x
xe x
Figure 3: Flowchart for calculating exp(x) using Maclaurin Series
(tart
Inputa) ) c
!cba s ++
=
)cs( * )bs( * )as( *s A −−−=
OutputA)P
*nd
P+,-s
(tart
)nputn,x
sum*+
Addx i-i$ tosum
/utputsum
0nd
fori from +
by ' ton1' do
&
8/20/2019 Algorithm Sing
http://slidepdf.com/reader/full/algorithm-sing 4/5
Figure 4: Alternate Flow hart to Figure 3 for alculating the Maclaurin Series
.eig!t in l seig!t in inc!es
Input.eig!t)
.
0eig!t)
123,*
H
W BMI =
round456I7
Is89:56I
2 ,;<
OutputUn!ealt!y
.eig!t
Outputealt!y.eig!t
=es>o
(tart
0nd
(tart
)nputn,x
i*+sum*+
)si3n4
Add x^i/i! to sumi*i5'
/utputsum
0nd
No
6es
%
8/20/2019 Algorithm Sing
http://slidepdf.com/reader/full/algorithm-sing 5/5