Basic
Flowcharting
(Flowcharting)
(Flowcharting)
1/3)
3
10
10
?
(2/3)
(3/3)
–
– -
– -
2
 (System
flowchart)
 (Program
flowchart)
(System
flowchart)
(Program flowchart)


100
= 0.5 * *
= 0.5 * *





(decision table)
(1/13)


American
National Standard Institute
(2/13)
(Terminal
)
1.
2.
1.
START
STOP
read name
display area
(3/13)
(Process)
1. A
+ B
C
2.
sum
0
i
C = A + B
Sum = 0
i <= 10
true
false
i
(4/13)
(Documen
t)
A
A,
B
print A
display A , B
(5/13)
(Commen
t)
(Manual
Input)
A
read A A = Age
read A
(6/13)
(Preparati
on)
i
1
1
100
sum i
for i =1 to 100
sum = sum + i
i
(7/13)
(In-Page
connector
)
A
A
A
write A
A = 3
1
(8/13)
(Punch
card)
1. A
1
2.
B,C
1
B1 ,
B2 , Bn
n
read A
punch B , C
punch
bi b=1 ,
…n
(9/13)
(Punched
tape)
ID ,
name
read ID ,
name
(10/13)
(Magnatic
disk)
(11/13)
(Predefine
Process)
findGra
de
findGrade
(12/13)
(Auxiliary
Operation)
(13/13)
(Communic
ation Link)
(1/2) START
STOP
read age
age > 60
“You are old”
true
false
(2/2)START
sum =
0
i = 1 to 10
sum = sum
+ i
i
sum
STOP
(3/2)


☺ (Sequence)
☺ / /
(Selection/Decision/Conditio
n)
☺ (Iteration / Loop)
(1/3)
(2/3)
START
STOP
A = 5
B = 3
C = A + B
print C
A 5
B 3
A B
C
(3/3)
A, B
A B
C
START
STOP
C = A + B
print C
A , B
1.
2.
--> < >
--> <
>
-----------------------------------------------------
: < >
: < >
3.
–
–
4.
– Last_meter
– Curr_meter
– Num_meter
– Electric_fee
5.
1.
2. last_meter
curr_meter
3. num_meter = curr_meter
– last_meter
4. electric_fee =
num_meter * 2.5
5. num_meter , electric_fee
Flow chart
START
STOP
Num_meter = Curr_meter – Last_meter
Last_meter ,
Curr_meter
Electric_fee = Num_meter * 2.5
Num_meter , Electric_fee
• (IF - THEN)
(1/5)
(2/5)START
STOP
read age
age > 60
“You are old”
true
false
age
age
(3/5)
GoodLuck
Welcome Manager
Exit
Password System
ans
ans = “GoodLuck”
Welcome
Manager
Exit Password
System
(4/5)
%

1.
2.
- =
( 10/100)
3. =
(5/5)
START
STOP
read
name ,salary
salary < 5000 Name , salary ,
bonus
true
false
salary = salary + (salary*10/100)
A
A
bonus = salary * 3
IF –
THEN
IF THEN
BEGIN
;
;
END;
IF THEN
ELSE
BEGIN
;
;
END;
(1/6)
(2/6)
• sex =1
Male
• sex =1
Female
Sex = 1
Male = Male +1Female = Female + 1
TrueFalse
(3/6)
START
STOP
read age
age > 60
“You are old”
truefalse
“You are young”
age
Yo
Yo
age
(4/6)
ans
ans = ‘y’ OR ans=‘Y’
Thank YouI’m sorry to hear that
Do you like Pascal
Good Bye
Do you like P
ans
ans
-
Thank you
-
I’m sorry to hear
Goodbye
(5/6)
%
5000 5%
•
1.
2. < 5000
- = 10/100
- = 5/100
3. = + ( *
)
4. =
(6/6)
START
STOP
read
name ,salary
salary < 5000
Name , salary ,
bonus
truefalse
rate = 10 / 100
A
A
bonus = salary * 3
rate = 5 / 100
salary = salary+(salary * rate)
(
IF)
TrueFalse
TrueFalse
TrueFalse
(
IF)
Score >=80
Grade = ‘A’
truefalse
Score >=70
Grade = ‘B’
truefalse
Score >=60
Grade = ‘C’
truefalse
Score >=50
Grade = ‘D’
truefalse
Grade = ‘F’
Score = mid + final
(
CASE)
(
CASE)
score
Grade = ‘B’Grade = ‘A’ Grade = ‘D’Grade = ‘C’
80..100 70..79 60..69 50..59
Grade = ‘F’
0..49
Score = mid + final
•
(Controlled Loop)
• (Pre-
Test Condition)
• (Post-
Test Condition)
Next
N 1 1
5
Next
N
For N =1 , 5
Next
Print N
True
False
•
N <= 5
– N
– N 1
(N=N+1)
•
N <=5
N = N+1
True
False
Print N
N = 1
True
False
–
N
–
N 1
•
N > 5
N > 5
True
False
N = N+1
Print N
N = 1

Flowchart