Algorithm & Flowchart
Algorithm & Flowchart
Development
About
• A typical programming task can be divided into
two phases:
• Problem solving phase
▫ produce an ordered sequence of steps that describe
solution of problem
▫ this sequence of steps is called an algorithm
• Implementation phase
▫ implement the program in some programming
language
Algorithm
Algorithm
ALGORITHM SUM_NUMBERS
//Purpose: To find sum of two numbers
//Input: Two numbers
//Output: Display sum
Step 1: start
Step 2: [ Print message]
print Hello world
Step 3 : [Finish]
stop
Algorithm
Start
Read a, b
sum = a + b
Print sum
Stop
Flowchart
• Example 2: Write a flowchart to print hello
world
Flowchart
Algorithm AreaRect
//purpose: Start
//Input: length n breadth
//output: area
Print area
Stop