## Algorithm and Flowchart

Definition of algorithm and flowchart as below:

### Algorithm

It is well known that the programs are used to solve the various kinds of problems by computerized technique. The algorithm is a step-by-step procedure that guarantees a solution if followed correctly.

It is a written process. To write an algorithm the given sequence of instruction must possess the following characteristics:

- Each and every instruction should be accurate and clear.
- Each instruction should finish within a definite time interval.
- One or more instructions should not repeat. It is obvious that the process should be terminated.
- After termination of the algorithm, the definite output must appear.

### Flowchart

The pictorial representation of a sequence of events that describe activities required in the program to solve the particular problem is called a flowchart. Therefore, a flowchart is a pictorial representation of an algorithm.

#### Features of flowchart:

- Originating or origination
- Inputting
- Processing
- Storage/ storing
- Outputting

### 1. Originating or origination

The collection of source data is an important job in any system either to draw a flowchart or to develop a program. Logically the collection of resources to develop the program called originating features.

### 2. Inputting

The processing of supplying data or instruction to a computer is inputting of records to a computer.

### 3. Processing

To obtain a specific output with respect to given data or instruction, a certain process should happen into the computer called processing.

### 4. Storage/ storing

After manipulating of system or program or data or instruction and output results either store temporarily or permanently into the computer. This is called storing of information.

### 5. Outputting

The output results appear after the completion of processing work. This is called outputting.

#### Advantages of Flowchart

- Effective analysis
- Proper program documentation
- Systematic testing
- Systematic debugging

#### Disadvantages of Flowchart

- Time-consuming and laborious work.
- Expensive and difficult to modify.
- The standard limit of investment.

### Some basic symbols of the flowchart are as given below:

#### Start/ end symbol

#### Action or process symbol

#### Decision or conditional symbol

#### Input/ output symbol

## Examples of Flowchart and Algorithm are:

**Example one**

Write an algorithm and draw a flowchart to finding a given number is odd or even.

A solution to this question as follows:

#### Algorithm:

#### Flowchart

#### Example two

Draw a flowchart to find the greatest number among the three numbers.

A solution to this question as follows:

#### For e.g. Algorithm:

#### Flowchart

#### Example three

Write the algorithm and draw the flowchart to find the smallest number among the three numbers.

#### A solution to this question as follows:

#### Algorithm

#### Flowchart

Also, for more notes visit