Introduction To Algorithms: Unit 1 / Chapter 1
Introduction To Algorithms: Unit 1 / Chapter 1
Algorithms
Unit 1 / Chapter 1
1.1 Introduction
Computer
Software
The hardware components of a computer system
consists of five main parts,
Problem Analysis
Steps in Design
Problem
Solving Coding
Testing
Maintenance
To solve a problem, the first
step is to identify and define the
problem.
Step 1: Start
Step 2: Read two values, say a and b
Step 3: Add a and b, and store the result
in another variable, say c
Step 4: Display the value of c.
Step 5: Stop
Assignments
• A flow chart indicates the flow of the entire process, sequence of data input,
operations, computations, decisions, results and other information.
Types of flow charts
2. Program flowcharts: It plans the program structure and also serves the
purpose of documentation for a program.
These are normally used by programmers to describe the sequence of
operations and decisions.
Characteristics
3. Care should be taken which showing the flow of data for complete
logic
Flowchart Symbols
Sl.
Purpose Symbol
No
1 Start and stop
4 Decision Making
5 connector
6 Route Makers
Sl.
Purpose Symbol
No
7 Predefined Process
8 Preparation / Looping
START
STOP
Draw a START
flowchart
to Read A & B
calculate
C =A * B
CA*B
Print C
STOP
Assignments