FlowCharting1.pptx
FlowCharting1.pptx
Slide 1 of 3
• Flow Charts Defined
– A flow chart is a pictorial representation showing all of the
steps of a process.
Flow Charts
Slide 2 of 3
• Creating a Flow Chart
– First, familiarize the participants with the flow chart symbols.
– Draw the process flow chart and fill it out in detail about
each element.
– Analyze the flow chart. Determine which steps add value
and which don’t in the process of simplifying the work.
Flow Charts
Slide 3 of 3
• A programming language is a
set of rules that provides a
way of telling a computer
what operations to perform.
Programming Tools:
• Flowchart
• Pseudocode
• Hierarchy Chart (Structure chart)
Algorithms
Symbol Meaning
== Equals
<> Not equal
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
What is a Pseudocode?
• Fahrenheit to Celsius :
1. get a value for ftemp
2. set the value of ctemp to (5 / 9) * (ftemp - 32)
3. return the value of ctemp
• Min:
1. get a value for X, Y
2. if X <= Y then
1. return the value of X
3. else
1. return the value of Y
What is a flowchart ?
• Logic diagram to describe each step that the program
must perform to arrive at the solution.
Write NAME,
INTEREST
Stop
Example of Flowchart and Pseudocode:
Computing The Sum, Average, and Product of Three
Numbers Flowchart
Start
Pseudocode
Read X, Y, Z
1. Read X, Y, Z
2. Compute Sum (S) As X + Y + Z
S=X+Y+Z
3. Compute Average (A) As S / 3 A=S/3
4. Compute Product (P) As X x Y x Z P=XxYxZ
5. Write (Display) the Sum, Average,
and Product
Write S, A, P
Stop
Example of Flowchart and Pseudocode:
Determine Large/Small
Flowchart
Start
Pseudocode
Read A, B
1. Read A, B
2. If A is less than B
1. BIG = B No Yes
BIG = A BIG = B
2. SMALL = A A < B?
SMALL = B SMALL = A
3. Else
1. BIG = A
2. SMALL = B
Write BIG, SMALL
4. Write (Display) BIG, SMALL
Stop
Loops
• Most programs involve repeating a series of instructions
over and over until some event occurs
• For example, if we wish to read ten numbers and compute
the average, we need a loop to count the number of
numbers we have read
• Count loops are loops where the program must count the
number of times operations are completed
Looping Flow Chart
Example of Flowchart:
A Loop that Counts from 1 to 10
Enter loop
K=1
K=K+1
No
K > 10?
Yes
Exit from loop
Class Average Algorithm