BCP Unit - 1
BCP Unit - 1
UNIT: 1
Flowchart and Algorithm
Flowchart
Definition and Importance of flowchart:
Flowchart: Flowchart is Graphical or Pictorial Representation of problem.
Symbols of flowchart:
1.Terminal:
o This Symbol is used for the Starting and Ending Process of Flowchart.
2.Input / Output
o This Symbol is used for Receiving input Data From user and displaying output to the user
3.Process
o This Symbol is used for Computing.
o It is Use for Some Arithmetic Calculation.
4.Decision Making
o This Symbol is used for making decision base on Condition.
o This Symbol has one incoming arrow for entry and Two outgoing arrow.
5.Subroutine
o This Symbol is used for user defined function or sub program.
6.Flow / Direction
o Flow line Symbol.
o This Symbol Indicates flow of data from one Symbol to Another Symbol.
7.Page Break
o When flowchart is do not fit into single page then Page Break and Page Continue Symbol is
used.
o Page Break Symbol Indicate break in current page.
8.Page Continue
o Page Continue Symbol Indicate Continue flowchart in another page.
2. Selection
Once the condition is evaluated, the control flows into one of two paths.
3. Repetition
Either the processing repeats or the control leaves the structure.
Limitation of flowchart:
1.Complex Logic: It is very difficult to draw a flowchart for very hard and complex problem
2.Difficulty in Modifications: If a minor change is required then it is difficult to change flowchart
and may be required to redraw flowchart again.
3.Difficult to understand for people who don't know flowchart symbols.
Limitation of Algorithm
1. An algorithm is Time consuming. Developing algorithm for complex problems would be time
consuming and difficult to understand.
2. Understanding complex logic through algorithms can be very difficult.
3. Difficult to show Branching and Looping in Algorithms.
4. Big tasks are difficult to put in Algorithms.
Examples:
Flowchart and algorithm to calculate area of circle.
Flowchart:
Algorithm:
1. START
2. INPUT: r
3. Calculate: Area= 3.14 * r *r
4. PRINT: Area
5. STOP
Pseudo code:
Pseudo code is not a programming language; it is a simple way of describing a set of instructions that
does not have to use specific syntax.
Example:
Print "passed"
else
Print "failed"