Page 71 - ThinkGPT_V2.1_C6_Flipbook
P. 71
Symbol Name Description
Decision It indicates a question or branch in the process flow. It is used
Diamond when there are 2 options (Yes/No).
Flow Line It shows the direction in which the process flows.
Rules to Draw Flowcharts Start
You must follow these basic rules while drawing a flowchart:
Maintain the direction of the flow from left to right or top to
Read P for Principal
bottom. r for rate
Only one flow line should come out from a process box. t for time
Only one flow line should enter a decision box, but two flow lines
should leave the decision box.
Calculate
Ensure that the flowchart has a logical start and end. SI = (P * r * t)/100
Look at the flowchart to calculate simple interest.
Print SI
Stop
Solving Problems using Algorithms and Flowcharts
Some examples are given below to solve the problems using algorithms and flowcharts:
Example 1: Write an algorithm and draw a flowchart to check weather a given number is even
or odd.
Algorithm: Flowchart:
Step 1 Start.
Start
Step 2 Read Number.
Step 3 Check If Number % 2 == 0 Then
Read a Number
print "Number is even."
Else
Is
Yes
print "Number is odd." Number%2==0? Print Number is even
Step 4 End.
No
Print Number is odd
Stop
Algorithmic Intelligence 69

