Вы находитесь на странице: 1из 11

Algorithm Design Tools

Cognifront.co
Objectives

• To Study Flowchart
• To Study Pseudocode

Cognifront.co
Tools to design Algorithm

• Flowchart

• Pseudocode

Cognifront.co
Flowchart

• Flowchart tool is used for graphical representation of an


algorithm.

• Flowchart makes use of simple symbols to indicate


operations or steps.

Cognifront.co
Flowchart Symbols

• Start / Stop : Start / Stop

• Assignment Statement or
Assignment
Expression : Statement

• Read / Print :
Read / Print

Cognifront.co
Flowchart Symbols (contd…..)

• Decision Making :
Decision
making

• Connector :

Connector

• Flow Indicator :
Cognifront.co
Pseudocode

• It is a kind of structured English.


• Focus is more on logic.
• It has no syntax.

Cognifront.co
Conventions for Pseudocode

• Language should be in simple English


• Avoid nested loops
• Avoid direct use of Mathematical Operators
• Avoid any programming language specific keywords

Cognifront.co
Example for Adding N numbers

Start

Read N

Sum=0; k=1

N
k<=N Print Sum

Y
Read X
Stop

Sum = Sum + X
k=k+1
Cognifront.co
Example for Adding N numbers

Input N
Initialize sum to zero
Initialize K to 1
While K is less than or equal to N
Input X
Add X into the sum
Add 1 to the K counter
Print the sum
Play Algorithm Design Tools Video from DV
Cognifront.co
Time for Students’ Questions!
Any Question?

Cognifront.co

Вам также может понравиться