An algorithm is a set of rules that defines how a particular problem can be solved in finite number of steps is known as algorithm. An algorithm is a description of steps or instructions required to solve a given problem. An algorithm also specifies the sequence in which the steps are to be performed.
Example: Calculate and print the sum of 2 numbers.
Step 1: Start
Step 2: Read the two number say A and B.
Step 3: Add A and B and store in C.
Step 4: Print C
Step 5: Stop
It is a pictorial representation of step by step solution of a program. There are various symbols used to make flow chart. These are:
|1.||Oval||Terminal use for start and stop|
|5.||Arrows||Direction of flow|
Example: Draw a flow chart to find the sum of 2 numbers.
Advantages of Flow Chart
1. Easy to understand
2. Concentrate on the logic of the problem
3. Provide effective help in debugging and maintaining a program.