0% found this document useful (0 votes)
8 views

Algorithm ICT

The document discusses the process of problem-solving in programming, emphasizing the importance of analyzing input and output data before coding. It introduces the concept of algorithms, defining their characteristics and types of control structures such as sequence, branching, and loops. Additionally, it explains flowcharts as visual representations of algorithms that aid in understanding and correcting programming logic.

Uploaded by

noromalalazo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Algorithm ICT

The document discusses the process of problem-solving in programming, emphasizing the importance of analyzing input and output data before coding. It introduces the concept of algorithms, defining their characteristics and types of control structures such as sequence, branching, and loops. Additionally, it explains flowcharts as visual representations of algorithms that aid in understanding and correcting programming logic.

Uploaded by

noromalalazo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

--------------------------------------------------------------------------------------------------------------------------

Before programming...

- Solving a problem means obtaining a result starting from a certain initial state and following an
appropriate
procedure.

- We need to analyze the problem by identifying the input data and, after processing, we shall obtain the
output data.

- Before writing the code to be executed we can "draw" a series of instructions that can solve the problem.

- Then we can translate these instructions into any programming language.

----------------------------------------------------------------------------------------------------------------------------------------------

ALGORITHM

The word “algorithm” relates to the name of the mathematician Al-khowarizmi, which means a procedure
or a technique. Software Engineer commonly uses an algorithm for planning and solving the problems. An
algorithm is a sequence of steps to solve a particular problem or algorithm is an ordered set of
unambiguous steps that produces a result and terminates in a finite time.

Algorithm has the following characteristics :

•Input: An algorithm may or may not require input


•Output: Each algorithm is expected to produce at least one result
•Definiteness: Each instruction must be clear and unambiguous.
•Finiteness: If the instructions of an algorithm are executed, the algorithm should terminate after finite
number of steps

The algorithm and flowchart include following three types of control structures:

1. Sequence: In the sequence structure, statements are placed one after the other and the execution
takes place starting from up to down.

2. Branching (Selection): In branch control, there is a condition and according to a condition, a decision of
either TRUE or FALSE is achieved. In the case of TRUE, one of the two branches is explored; but in the case
of FALSE condition, the other alternative is taken. Generally, the ‘IF-THEN’ is used to represent branch
control.

3. Loop (Repetition): The Loop or Repetition allows a statement(s) to be executed repeatedly based on
certain loop condition e.g. WHILE, FOR loops.

----------------------------------------------------------------------------------------------------------------------------------------------

FLOWCHART

Flowcharts are diagrams that visually describe how the execution of a program proceeds. They are not
related to a specific language.
It is a visual language understandable to all programmers. The flow chart also helps the programmer to
correctly describe an algorithm.
Flowchart is diagrammatic /Graphical representation of sequence of steps to solve a problem. To draw a
flowchart following standard symbols are use.

You might also like