You are on page 1of 14

We will start at 7:30 AM or until all your classmates

have joined the meet


• Eat your breakfast, if you haven’t eaten yet.
ALGORITHM AND
FLOWCHARTS
ALGORITHM
Algorithm
• An algorithm is procedure consisting of a finite set of clear
rules (instructions) which specify a finite sequence of
operations that provides the solution to a problem, or to a
specific class of problems for any allowable set of input
quantities (if there are inputs). In other word, an algorithm
is a step-by-step procedure to solve a given problem
Example of Algorithm
• Cooking an Egg.
• Direction to arrive at your favourite fast food chain.
• One of the obstacles to overcome in using a computer to
solve your problems is that of translating the idea of the
algorithm to computer code (program). People cannot
normally understand the actual machine code that the
computer needs to run a program, so programs are
written in a programming language such as C or Pascal,
which is then converted into machine code for the
computer to run.
• In the problem-solving phase of computer programming,
you will be designing algorithms. This means that you will
have to be conscious of the strategies you use to solve
problems in order to apply them to programming
problems. These algorithms can be designed though the
use of flowcharts or pseudocode.
FLOWCHARTS
Flowcharting
• A tool developed in the computer industry, for showing the
steps involved in a process.
• A flowchart is a diagram made up of boxes, diamonds and
other shapes, connected by arrows - each shape
represents a step in the process, and the arrows show the
order in which they occur.
• Flowcharting combines symbols and flowlines, to show
figuratively the operation of an algorithm.
• In computing, there are dozens of different symbols used
in flowcharting (there are even national and international
flowcharting symbol standards).
• In business process analysis, a couple of symbols are
sufficient. A box with text inside indicates a step in the
process, while a diamond with text represents a decision
point.
Flowcharting Symbols
General Rules for flowcharting
• 1. All boxes of the flowchart are connected with Arrows.
(Not lines)
• 2. Flowchart symbols have an entry point on the top of the
symbol with no other entry points. The exit point for all
flowchart symbols is on the bottom except for the Decision
symbol.
• 3. The Decision symbol has two exit points; these can be
on the sides or the bottom and one side.
• 4. Generally a flowchart will flow from top to bottom.
However, an upward flow can be shown as long as it does
not exceed 3 symbols.
• 5. Connectors are used to connect breaks in the
flowchart. Examples are:
• • From one page to another page.
• • From the bottom of the page to the top of the same
page.
• • An upward flow of more then 3 symbols
• 6. Subroutines and Interrupt programs have their own and
independent flowcharts.
• 7. All flow charts start with a Terminal or Predefined
Process (for interrupt programs or subroutines) symbol.
• 8. All flowcharts end with a terminal or a contentious loop.

You might also like