SlideShare a Scribd company logo
• Introduction to Structured Programming
• Structured programming is a method for designing and coding
programs in a systematic organized manner.
• Sequencing, selection and looping are the basic building blocks that
make-up a structured program.
• Programs with complex flow of control are difficult to understand and
hence to modify and debug.
• Structured programming controls the complexity of the flow of control
by using only a small number of simple and standard control structures.
• Further a complex problem is divided into logically independent units
(or modules) and these units are then joined using the basic structures.
• The advantages of structured programming are
• These are easier to understand since the modules can be considered
independently.
• These are easier to understand because it is easier to identify the structure of
a particular program component.
• Easier to maintain or modify because the individual modules can be corrected
without changing the entire program.
• Ultimately it is easier to design because the modules can be designed
independently.
• Steps involved in computer programming
• 1. Defining the problem
• 2. Outlining the solution
• 3. Selecting and representing algorithms
• 4. Coding
• 5. Debugging
• 6. Testing and Validation
• 7. Documenting
• 8. Program maintenance
• Program solving methodology
• Algorithm
• Algorithm is a step by step procedure for solving a problem for
processing data.
• It can be defined as a sequence of instructions that accomplishes a
task in a finite time.
• It consists of clear and unambiguous instructions and terminates after
a finite number of steps.
• An algorithm is prepared using natural language like English.
• An algorithm prepared using a combination of words in English
language and a high-level language called pseudocode.
• Flow chart symbols
• A flowchart is a graphical representation of an algorithm and its
control flow.
• Logic can be easily developed.
• Errors can be easily detected.
• Each symbol used in drawing a flowchart has standardized specific
meaning.
1141_237_747_Module_1_3_process_modelling_and-simulation.pptx
• The following are the generally used flow chart symbols
• 1. Terminal symbol
• Indicate the beginning and ending (START/END)
• 2.Input/Output symbol
• The parallelogram indicates the inputs to and outputs from the flow chart.
• The action to be carried out whether input or output, should be mentioned in
the box.
• 3. Process Symbol
• Processing to be carried out on the data such as a computation or data
movement is represented in a flow chart using a rectangle.
• If two or more processing steps are to be carried out consecutively, they can
be placed in a single box and they will be executed in the order of their
placement.
• 4. Decision symbol
• A rhombus shaped symbol is used in a flow chart to indicate branching based
on decision.
• The output of the branching criteria decides selection of branch.
• The criterion for making decision is written within the decision box.
• While using the decision box, all possible outcomes of the criterion should be
accounted for and they should be labelled accordingly.
• During execution, appropriate path is followed depending on the result of the
decision.
• 5. Flow lines
• Lines with arrowhead at one end are used to indicate the flow of execution.
• Though flowlines can be drawn in four direction, the use of curved lines must
be avoided
• Moreover the flow lines should not cross each other.
• 6. Connectors
• When flow chart is too long or the algorithm is complicated, we will have to
draw flow lines from top to bottom and from bottom to top at many places.
• This will cause confusion and reduce clarity of flow chart.
• Moreover there are instances when a flow chart becomes too long to fit in a
single page and the use of flow lines become complex.
• In such occasions the connector symbols can be used effectively to connect the
different parts of a flowchart that are drawn separately.
• The connector symbol is represented by a small circle and a letter or a digit
placed within the circle to indicate the link.
• A pair of identically labelled connector symbols is used to indicate a continuous
flow.
• In this case the connector to which a flow line ends is called the exit connector
and the connector from which a flow line starts is the entrance connector.
• Example 1
• Write the algorithm and draw a flowchart for finding the sum and
average of two numbers
• Algorithm
• 1. Start/Begin
• 2. Input two numbers a and b
• 3. Calculate sum = a+b, average = sum/2
• 4. Display sum and average
• 5. Stop/End
1141_237_747_Module_1_3_process_modelling_and-simulation.pptx
• Example 2
• Write the algorithm and draw a flowchart for finding the largest of two
numbers
• Algorithm
• 1. Start
• 2. Input two numbers a and b
• 3. Check whether a>b
• 4. If yes, display a is large
• 5. If no, check whether a = b
• 6. If yes, display a and b are equal
• 7. If no, display b is large
• 8. End
1141_237_747_Module_1_3_process_modelling_and-simulation.pptx
• Homework
• Write the algorithm and draw flow charts
• 1. To find the area of a circle
• 2. To find the biggest of three numbers

More Related Content

PPT
algorithm
PPTX
Pseudo code.pptx
PPT
Lecture 4
PDF
Algorithm & Flowchart.pdf
PPTX
FPL -Part 2 ( Sem - I 2013)
PPT
Unit 1 psp
PDF
Algorithmic problem sloving
PPTX
Flow chart
algorithm
Pseudo code.pptx
Lecture 4
Algorithm & Flowchart.pdf
FPL -Part 2 ( Sem - I 2013)
Unit 1 psp
Algorithmic problem sloving
Flow chart

Similar to 1141_237_747_Module_1_3_process_modelling_and-simulation.pptx (20)

PPTX
Flowchart Grade 10
PPTX
Basic syntax : Algorithm,Flow chart
PPTX
Software Development Technique (Flowchart & Documentation).pptx
PDF
final Unit 1-1.pdf
PPTX
FLOWCHARTS.pptx
PDF
PROGRAMMING IN C UNIT I.pdffffffffffffffffffffffffd
PPTX
Algorithm week2(technovation)
PPTX
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
PPT
Proble, Solving & Automation
PPT
UNIT- 3-FOC.ppt
PPTX
Introduction to Computer Programming for Data Sciences.pptx
PDF
Chapter-1-Introduction-to-Aglorithms.pdf
PPTX
IDENTIFY THE DIFFERENT KINDS OF TECHNICAL DRAWING.pptx
PPTX
Algorithm and flowchart
PPT
aamir presentation
PPTX
Algorithm in data structure bca .pptx
PPT
C programming for Computing Techniques
PPTX
basics of c programming for naiver.pptx
PDF
Code optimization in compiler design
PDF
introduction of Data structure with example
Flowchart Grade 10
Basic syntax : Algorithm,Flow chart
Software Development Technique (Flowchart & Documentation).pptx
final Unit 1-1.pdf
FLOWCHARTS.pptx
PROGRAMMING IN C UNIT I.pdffffffffffffffffffffffffd
Algorithm week2(technovation)
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
Proble, Solving & Automation
UNIT- 3-FOC.ppt
Introduction to Computer Programming for Data Sciences.pptx
Chapter-1-Introduction-to-Aglorithms.pdf
IDENTIFY THE DIFFERENT KINDS OF TECHNICAL DRAWING.pptx
Algorithm and flowchart
aamir presentation
Algorithm in data structure bca .pptx
C programming for Computing Techniques
basics of c programming for naiver.pptx
Code optimization in compiler design
introduction of Data structure with example
Ad

Recently uploaded (20)

PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Construction Project Organization Group 2.pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PPT on Performance Review to get promotions
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Welding lecture in detail for understanding
PDF
composite construction of structures.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
additive manufacturing of ss316l using mig welding
PPTX
web development for engineering and engineering
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Construction Project Organization Group 2.pptx
573137875-Attendance-Management-System-original
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Structs to JSON How Go Powers REST APIs.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT on Performance Review to get promotions
Model Code of Practice - Construction Work - 21102022 .pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Welding lecture in detail for understanding
composite construction of structures.pdf
Foundation to blockchain - A guide to Blockchain Tech
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
additive manufacturing of ss316l using mig welding
web development for engineering and engineering
Arduino robotics embedded978-1-4302-3184-4.pdf
Ad

1141_237_747_Module_1_3_process_modelling_and-simulation.pptx

  • 1. • Introduction to Structured Programming • Structured programming is a method for designing and coding programs in a systematic organized manner. • Sequencing, selection and looping are the basic building blocks that make-up a structured program. • Programs with complex flow of control are difficult to understand and hence to modify and debug. • Structured programming controls the complexity of the flow of control by using only a small number of simple and standard control structures. • Further a complex problem is divided into logically independent units (or modules) and these units are then joined using the basic structures.
  • 2. • The advantages of structured programming are • These are easier to understand since the modules can be considered independently. • These are easier to understand because it is easier to identify the structure of a particular program component. • Easier to maintain or modify because the individual modules can be corrected without changing the entire program. • Ultimately it is easier to design because the modules can be designed independently.
  • 3. • Steps involved in computer programming • 1. Defining the problem • 2. Outlining the solution • 3. Selecting and representing algorithms • 4. Coding • 5. Debugging • 6. Testing and Validation • 7. Documenting • 8. Program maintenance
  • 4. • Program solving methodology • Algorithm • Algorithm is a step by step procedure for solving a problem for processing data. • It can be defined as a sequence of instructions that accomplishes a task in a finite time. • It consists of clear and unambiguous instructions and terminates after a finite number of steps. • An algorithm is prepared using natural language like English. • An algorithm prepared using a combination of words in English language and a high-level language called pseudocode.
  • 5. • Flow chart symbols • A flowchart is a graphical representation of an algorithm and its control flow. • Logic can be easily developed. • Errors can be easily detected. • Each symbol used in drawing a flowchart has standardized specific meaning.
  • 7. • The following are the generally used flow chart symbols • 1. Terminal symbol • Indicate the beginning and ending (START/END) • 2.Input/Output symbol • The parallelogram indicates the inputs to and outputs from the flow chart. • The action to be carried out whether input or output, should be mentioned in the box. • 3. Process Symbol • Processing to be carried out on the data such as a computation or data movement is represented in a flow chart using a rectangle. • If two or more processing steps are to be carried out consecutively, they can be placed in a single box and they will be executed in the order of their placement.
  • 8. • 4. Decision symbol • A rhombus shaped symbol is used in a flow chart to indicate branching based on decision. • The output of the branching criteria decides selection of branch. • The criterion for making decision is written within the decision box. • While using the decision box, all possible outcomes of the criterion should be accounted for and they should be labelled accordingly. • During execution, appropriate path is followed depending on the result of the decision. • 5. Flow lines • Lines with arrowhead at one end are used to indicate the flow of execution. • Though flowlines can be drawn in four direction, the use of curved lines must be avoided • Moreover the flow lines should not cross each other.
  • 9. • 6. Connectors • When flow chart is too long or the algorithm is complicated, we will have to draw flow lines from top to bottom and from bottom to top at many places. • This will cause confusion and reduce clarity of flow chart. • Moreover there are instances when a flow chart becomes too long to fit in a single page and the use of flow lines become complex. • In such occasions the connector symbols can be used effectively to connect the different parts of a flowchart that are drawn separately. • The connector symbol is represented by a small circle and a letter or a digit placed within the circle to indicate the link. • A pair of identically labelled connector symbols is used to indicate a continuous flow. • In this case the connector to which a flow line ends is called the exit connector and the connector from which a flow line starts is the entrance connector.
  • 10. • Example 1 • Write the algorithm and draw a flowchart for finding the sum and average of two numbers • Algorithm • 1. Start/Begin • 2. Input two numbers a and b • 3. Calculate sum = a+b, average = sum/2 • 4. Display sum and average • 5. Stop/End
  • 12. • Example 2 • Write the algorithm and draw a flowchart for finding the largest of two numbers • Algorithm • 1. Start • 2. Input two numbers a and b • 3. Check whether a>b • 4. If yes, display a is large • 5. If no, check whether a = b • 6. If yes, display a and b are equal • 7. If no, display b is large • 8. End
  • 14. • Homework • Write the algorithm and draw flow charts • 1. To find the area of a circle • 2. To find the biggest of three numbers