# Algorithm and Flowchart in Programming

## Algorithm

The word “algorithm” relates to the name of the mathematician Al-khowarizmi, which means a procedure or a technique. An algorithm is often used by software engineers to plan and solve problems.

Definition 1: An algorithm is a method or set of rules to be followed in calculations or other problem-solving operations.

Definition 2: An algorithm is a set of rules/instructions that specify how a work is to be conducted step-by-step in order to get the desired results.

Definition 3: An algorithm is a series of defined actions that generates a result and terminates at a finite time that solves a specific problem.

### Algorithm has the following characteristics

• Input: An algorithm may or may not require input
• Output: Each algorithm is expected to produce at least one result
• Definiteness: Each instruction must be clear and unambiguous.
• Finiteness: If the instructions of an algorithm are executed, the algorithm should terminate after finite number of steps

• An algorithm uses a definite procedure.
• It is a step-wise representation of a solution to a given problem, which makes it easy to understand.
• It is not dependent on any programming language, so it is easy to understand for anyone even without programming knowledge.
• Every step in an algorithm has its own logical sequence so it is easy to debug

### Example

• START
• Read 3 numbers a, b, c
• Compute Sum = a+b+c
• Compute Average = sum/3
• Print average value
• STOP

## Flowchart

Flowchart is often considered as a blueprint of a design used for solving a specific problem.

A flowchart is a graphical representation of an algorithm. Programmers often use it as a program-planning tool to solve a problem. It makes use of symbols which are connected among them to indicate the flow of information and processing.

The process of drawing a flowchart for an algorithm is known as “flowcharting”.