Friday, September 12, 2008

"FLOWCHARTING AND ALGORITHMS" by: M. Nona Sison

FLOWCHARTING - is a two –dimensional representation of an algorithm.

A diagram representing the logical sequence in which a combination of steps is to be performed.
A common method of defining the logical steps of flow within a program by using a series of symbols to identify the basic input, process and output function within a program.

  • Algorithm-is a finite set of instruction that specify a sequence of operations to be carried out in order to solve a specific problem or class of problems.Basic symbols used in flowcharting:
  • Terminal- it is used to signify the beginning and the end.
    Preparation/ initialization- signifies the preparation of data. used to select initial conditions. Used to represent instructions or groups of instructions that will alter or modify a program's course of execution.
  • Input/Output- shows input and output. data are to be read inro the omputer's memory from an input device or data are to be passed fom the memory to an output device.
  • Processing- performs any calculations that are to be done.
  • Decision- signifies any decisions to be done.
  • On – page Connector- Shows the entry or exit point of the flowchart. A non – processing symbol used to connect one part of the flowchart to another without drawing flow lines.
  • Off – page Connector- Designated entry to or exit from one page when a flowchart requires more than one page.
  • Flow lines- Signifies the process that is to be executed next.
There are three BASIC CONTROL structures:
  1. Sequence
  2. Selection
  3. Repetition

Sequence- a process executed from one to another in a straightforward manner.

Selection (if- then- else)- a choice is provided between alternatives.

Repetition (Looping) - provides for the rpetitive exection of an operation or routine while the conditio is true.

Commonly Used Operators in Flowcharting

Arithmetic operators
+ addition
- subtraction
* multiplication
/ division

Relational Operators

Equal ,lesser than,greater than, not equal, greater than or equal to, lesser than or equal to

Logical Operators

&&- and

ll or

! not

No comments: