Algorithms Flowcharts Notes
Algorithms Flowcharts Notes
Algorithms Flowcharts Notes
OR
An algorithm is a finite set of well defined instructions or step by step procedure to solve
a given problem.
Characteristics of an Algorithm
Algorithm Notation
Advantages of Algorithm
• Effective communication: Since algorithm is written in English like
language, logic of the problem can be explained easily to others
• Easy and efficient coding : It acts as a blue print during a program
development
• Program debugging : Helps in debugging so that we can identify the
logical errors in a program
• Program maintenance : maintaining the software becomes much easier
1
Programming Fundamentals with C Padmashree Desai, Asst.Prof, CSE Dept
Examples
Step 1: start
Step 2: read a,b,c [ input 3 numbers]
Step 3: sum ß a + b + c [ find sum]
Step 4: avg ß sum/3 [find average]
Step 5: print sum, avg [output the result]
Step 6: stop
2
Programming Fundamentals with C Padmashree Desai, Asst.Prof, CSE Dept
Disadvantage of algorithm
• Developing algorithm for large and complex problems would be time consuming
and difficult to understand
• Understanding complex logic through algorithms would be difficult
Flowcharts
It is diagrammatic or pictorial representation of an algorithm. In other words “A
flowchart is a diagrammatic representation that illustrates the sequence of operations to be
performed to get the solution of a problem.” The various symbols are used to write different
instructions/operations.
Symbols :
3
Programming Fundamentals with C Padmashree Desai, Asst.Prof, CSE Dept
Advantages
• Flowchart form a good visual aid to represent the logic for the problem solution
• Easy and efficient coding: Writing program is easy
• Program debugging : Helps in debugging so that we can identify the logical
errors in a program
• Program maintenance : maintaining the software becomes much easier
Disadvantages of flowchart
Complex logic: For complicated logic, the flowchart becomes complex and clumsy
Alterations and modifications : If there is change in the logic, the flowchart becomes
to be completely rewritten and requires lot of time.
----------------------------------------------------
Uploaded by Nix