Flowcharts - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Flowcharts

Description:

Title: Flowcharts Author: ABI Last modified by: ITC Created Date: 5/10/2005 4:20:59 AM Document presentation format: On-screen Show (4:3) Company: TE FT UGM – PowerPoint PPT presentation

Number of Views:253
Avg rating:3.0/5.0
Slides: 15
Provided by: abi123
Category:
Tags: flowcharts

less

Transcript and Presenter's Notes

Title: Flowcharts


1
Flowcharts Algorithms
  • Lecture-2

2
Steps in using a computer as problem solving tool
  • Develop an Algorithm and a Flowchart.
  • Write the program in programming language (C,
    C, JAVA, COBOL, etc.).
  • Enter the program in computer.
  • Test and Debug the program.
  • Run the program, input data, and get the result
    from the computer.

3
What is ALGORITHM?
  • Definition Algorithm is a step by step procedure
    to solve a problem (Finite steps).
  • Algorithm can be presented or written in Words.
  • Algorithm can be represented diagrammatically in
    Flowchart.

4
The Flowchart
  • Dictionary) A schematic representation of a
    sequence of operations, as in a manufacturing
    process or computer program.
  • (Technical) A graphical representation of the
    sequence of operations in an information system
    or program. Information system flowcharts show
    how data flows from source documents through the
    computer to final distribution to users. Program
    flowcharts show the sequence of instructions in a
    single program or subroutine. Different symbols
    are used to draw each type of flowchart.

5
The Flowchart
  • A Flowchart
  • shows logic of an algorithm
  • emphasizes individual steps and their
    interconnections
  • e.g. control flow from one action to the next

6
Symbol
Terminal Symbol indicates the starting or
stopping pointin the logic.
Input/Output Symbol Represents an input or
output process in an algorithm
Process Symbol Represents any single process in
an algorithm
Predefined Process Symbol
Decision Symbol Represents a decision in the
logic involving the comparison Of two values.
7
The three basic control structures-
  • Sequence
  • Selection
  • Repetition

8
1. Sequence
Statemement a
Statemement b
Statemement c
9
Example
  • Algorithm
  • Step 1 Input W,L
  • Step 2 A ? L x W
  • Step 3 Print A

10
2. Selection
Condition p?
T
F
Statemement a
Statemement b
11
Example
Step 1 Input M1,M2,M3,M4 Step 2 GRADE ?
(M1M2M3M4)/4 Step 3 if (GRADE lt50) then
Print FAIL else Print PASS endif
PRINT PASS
12
Selection (2)
Condition p?
F
T
Statemement a
13
3. Repetition
Condition p?
F
T
Statemement block
14
Example
Algorithm Flowchart
Start Design the Software. Use the Design for Code. Test the Software. If error If error is Design Then correct the Design Else Correct the Code Stop
Write a Comment
User Comments (0)
About PowerShow.com