Showing posts with label Decision. Show all posts
Showing posts with label Decision. Show all posts

Sunday, November 14, 2021

ALGORITHM vs. FLOWCHART

Definition of Algorithm
To write a logical step-by-step method to solve the problem is called algorithm, in other words, an algorithm is a procedure for solving problems. In order to solve a mathematical or computer problem, this is the first step of the procedure. An algorithm includes calculations, reasoning and data processing. Algorithms can be presented by natural languages, pseudo code and flowcharts, etc.



Definition of Flowchart
A flowchart is the graphical or pictorial representation of an algorithm with the help of different symbols, shapes and arrows in order to demonstrate a process or a program. With algorithms, we can easily understand a program. The main purpose of a flowchart is to analyze different processes. Several standard graphics are applied in a flowchart:

 

Symbol

Purpose

Description


Flow line

Indicates the flow of logic by connecting symbols.


Terminal(Stop/Start)

Represents the start and the end of a flowchart.


Input/Output

Used for input and output operation.


Processing

Used for arithmetic operations and data-manipulations.


Decision

Used for decision making between two or more alternatives.


On-page Connector

Used to join different flowline


Off-page Connector

Used to connect the flowchart portion on a different page.


Predefined Process/Function

Represents a group of statements performing one processing task.

 

S.NO

ALGORITHM

FLOWCHART

1.

Algorithm is step by step procedure to solve the problem.

Flowchart is a diagram created by different shapes to show the flow of data.

2.

Algorithm is complex to understand.

Flowchart is easy to understand.

3.

In algorithm plain text are used.

In flowchart, symbols/shapes are used.

4.

Algorithm is easy to debug.

Flowchart it is hard to debug.

5.

Algorithm is difficult to construct.

Flowchart is simple to construct.

6.

Algorithm does not follow any rules.

Flowchart follows rules to be constructed.

7.

Example: Add two numbers entered by the user.

ALGORITHM:

A.     Begin        

B.      Read value of variable 1 and variable 2.

C.      Add the values of variable 1 and variable 2.

D.     Assign the sum to Total variable.

E.      Display the value of total.

F.      End

 

Example: Add two numbers entered by the user.

FLOWCHART:


 

 

Search Aptipedia