SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Flowcharts
Mukesh N.Tekwani
IsmailYusuf College of
Arts, Science and Commerce,
Jogeshwari (East),
Mumbai
tekwani@email.com
Presented at the One DayWorkshop Organized by K.P.B. Hinduja College
of Commerce, University of Mumbai on the Semester-wise splitT.Y.B.Com
and S.Y.B.Com Computer papers on
July 20, 2013
What is a Flowchart?
 What is a flowchart?
◦ Graphical or pictorial representation of an
algorithm or problem solving process
 Flow?
◦ Indicates the flow of logic, or sequence of
steps.
◦ There is a ‘before’ step and an ‘after’ step
◦ Flow control is needed because programs are
not linear or top-to-down
Mukesh N.Tekwani20 July 2013 2
Why flowchart is useful?
 A picture is worth a thousand words
 Help in understanding complicated logic
 Language-independent and so easy to write
program in various languages
 Good tool for documentation
◦ Verbose syntax of certain languages is difficult to
understand; flowchart eliminates the need to know
syntax to understand the logic
Mukesh N.Tekwani20 July 2013 3
What can a Flowchart Represent?
 Sequential statements – assignment,
calculations, input & output
 Branching or Selection Statements – if-then,
if-then-else: using Decision Symbol
 Looping Statements – for, while loops
 Switch-Case statement (successive decision
symbols)
Mukesh N.Tekwani20 July 2013 4
Symbols used in Flowcharts
Mukesh N.Tekwani20 July 2013 5
Guidelines in Drawing a Flowchart
 Logical sequence
 Standard symbols
 Direction of flow  top-to-down
◦ To jump to a step further down, go from right
◦ To jump to a step above the current step, go
from left
Mukesh N.Tekwani20 July 2013 6
Guidelines in Drawing a Flowchart
 Only one flow line should enter a decision
symbol
 More than one flow line may leave a symbol
 Only one flow line used with Stop symbol
 Use connector symbol to breakup a
complex flowchart
 A flowchart must end with the Stop
statement
Mukesh N.Tekwani20 July 2013 7
Flowchart of ‘while’ loop
Mukesh N.Tekwani20 July 2013 8
Flowchart of ‘for’ loop
Mukesh N.Tekwani20 July 2013 9
Flowchart of ‘if’ statement
Mukesh N.Tekwani20 July 2013 10
Flowchart of ‘if-else’ statement
Mukesh N.Tekwani20 July 2013 11
Flowchart of ‘switch-case’ statement
Mukesh N.Tekwani20 July 2013 12
Sum of Two Numbers
Mukesh N.Tekwani20 July 2013 13
START
INPUT X, Y
Is X > Y ?
BIG = X
Yes
PRINT BIG
BIG = Y
STOP
No
L
a
r
g
e
r
O
f
T
w
o
N
u
m
b
e
r
s
Mukesh N.Tekwani20 July 2013 14
F
a
c
t
o
r
i
a
l
o
f
a
N
u
m
b
e
r
Yes
START
Read N
F = 1
M = 1
Is
M = N?
F = F * M
Print F
No
M = M + 1
STOP
Assume:
N  no. whose factorial is
required
Mukesh N.Tekwani20 July 2013 15
MultiplicationTableofanumberinputby
user
Mukesh N.Tekwani20 July 2013 16
Flowchart – Find the Largest of Three Numbers
Mukesh N.Tekwani20 July 2013 17
Limitations of Flowcharts
 Complex – for lengthy algorithms, flowchart
can be very large  difficult to follow
 Time-consuming – drawing complex
flowcharts can be very time-consuming
 Modification – difficult to modify; redraw
entire flowchart
 Update – program update is easier; not so
for flowcharts  redraw flowchart !
Mukesh N.Tekwani20 July 2013 18
Exercise
 Design an algorithm and the corresponding
flowchart for finding the sum of the numbers
2, 4, 6, 8, …, n
 Draw a flowchart to read 100 numbers and
then display the sum
 Draw a flowchart to display all odd numbers
between 0 and 1000
 Draw a flowchart to find the sum of first 10
natural numbers and then display the sum
Mukesh N.Tekwani20 July 2013 19
Suggestions
 Algorithm  Flowchart  Program
 Use programs in C language to develop
questions on Algorithms and Flowcharts
Mukesh N.Tekwani20 July 2013 20
THANK YOU
STOP
Mukesh N.Tekwani20 July 2013 21

Weitere ähnliche Inhalte

Was ist angesagt?

Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartRabin BK
 
Presentation on C Switch Case Statements
Presentation on C Switch Case StatementsPresentation on C Switch Case Statements
Presentation on C Switch Case StatementsDipesh Pandey
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C pptMANJUTRIPATHI7
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
Hardware and Software Components of Computer
Hardware and Software Components of ComputerHardware and Software Components of Computer
Hardware and Software Components of ComputerForum of Blended Learning
 
Block diagram of a computer
Block diagram of a computerBlock diagram of a computer
Block diagram of a computerZTE Nepal
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and FlowchartsSURBHI SAROHA
 
evolution of operating system
evolution of operating systemevolution of operating system
evolution of operating systemAmir Khan
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 
Power point final practical exam
Power point final practical examPower point final practical exam
Power point final practical examDenis Odhiambo
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 

Was ist angesagt? (20)

Logic gates
Logic gatesLogic gates
Logic gates
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Presentation on C Switch Case Statements
Presentation on C Switch Case StatementsPresentation on C Switch Case Statements
Presentation on C Switch Case Statements
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C ppt
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Hardware and Software Components of Computer
Hardware and Software Components of ComputerHardware and Software Components of Computer
Hardware and Software Components of Computer
 
Block diagram of a computer
Block diagram of a computerBlock diagram of a computer
Block diagram of a computer
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and Flowcharts
 
evolution of operating system
evolution of operating systemevolution of operating system
evolution of operating system
 
Graphical programming
Graphical programmingGraphical programming
Graphical programming
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Power point final practical exam
Power point final practical examPower point final practical exam
Power point final practical exam
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Control structure
Control structureControl structure
Control structure
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 

Mehr von Mukesh Tekwani

ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - PhysicsMukesh Tekwani
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion Mukesh Tekwani
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Mukesh Tekwani
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversionMukesh Tekwani
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion Mukesh Tekwani
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversionMukesh Tekwani
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Mukesh Tekwani
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prismMukesh Tekwani
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surfaceMukesh Tekwani
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomMukesh Tekwani
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesMukesh Tekwani
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEMukesh Tekwani
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 

Mehr von Mukesh Tekwani (20)

Circular motion
Circular motionCircular motion
Circular motion
 
Gravitation
GravitationGravitation
Gravitation
 
ISCE-Class 12-Question Bank - Electrostatics - Physics
ISCE-Class 12-Question Bank - Electrostatics  -  PhysicsISCE-Class 12-Question Bank - Electrostatics  -  Physics
ISCE-Class 12-Question Bank - Electrostatics - Physics
 
Hexadecimal to binary conversion
Hexadecimal to binary conversion Hexadecimal to binary conversion
Hexadecimal to binary conversion
 
Hexadecimal to decimal conversion
Hexadecimal to decimal conversion Hexadecimal to decimal conversion
Hexadecimal to decimal conversion
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
 
Gray code to binary conversion
Gray code to binary conversion Gray code to binary conversion
Gray code to binary conversion
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Decimal to Binary conversion
Decimal to Binary conversionDecimal to Binary conversion
Decimal to Binary conversion
 
Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21Video Lectures for IGCSE Physics 2020-21
Video Lectures for IGCSE Physics 2020-21
 
Refraction and dispersion of light through a prism
Refraction and dispersion of light through a prismRefraction and dispersion of light through a prism
Refraction and dispersion of light through a prism
 
Refraction of light at a plane surface
Refraction of light at a plane surfaceRefraction of light at a plane surface
Refraction of light at a plane surface
 
Spherical mirrors
Spherical mirrorsSpherical mirrors
Spherical mirrors
 
Atom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atomAtom, origin of spectra Bohr's theory of hydrogen atom
Atom, origin of spectra Bohr's theory of hydrogen atom
 
Refraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lensesRefraction of light at spherical surfaces of lenses
Refraction of light at spherical surfaces of lenses
 
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGEISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
 
Cyber Laws
Cyber LawsCyber Laws
Cyber Laws
 
XML
XMLXML
XML
 
Social media
Social mediaSocial media
Social media
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 

Kürzlich hochgeladen

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Kürzlich hochgeladen (20)

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

Flowcharts

  • 1. Flowcharts Mukesh N.Tekwani IsmailYusuf College of Arts, Science and Commerce, Jogeshwari (East), Mumbai tekwani@email.com Presented at the One DayWorkshop Organized by K.P.B. Hinduja College of Commerce, University of Mumbai on the Semester-wise splitT.Y.B.Com and S.Y.B.Com Computer papers on July 20, 2013
  • 2. What is a Flowchart?  What is a flowchart? ◦ Graphical or pictorial representation of an algorithm or problem solving process  Flow? ◦ Indicates the flow of logic, or sequence of steps. ◦ There is a ‘before’ step and an ‘after’ step ◦ Flow control is needed because programs are not linear or top-to-down Mukesh N.Tekwani20 July 2013 2
  • 3. Why flowchart is useful?  A picture is worth a thousand words  Help in understanding complicated logic  Language-independent and so easy to write program in various languages  Good tool for documentation ◦ Verbose syntax of certain languages is difficult to understand; flowchart eliminates the need to know syntax to understand the logic Mukesh N.Tekwani20 July 2013 3
  • 4. What can a Flowchart Represent?  Sequential statements – assignment, calculations, input & output  Branching or Selection Statements – if-then, if-then-else: using Decision Symbol  Looping Statements – for, while loops  Switch-Case statement (successive decision symbols) Mukesh N.Tekwani20 July 2013 4
  • 5. Symbols used in Flowcharts Mukesh N.Tekwani20 July 2013 5
  • 6. Guidelines in Drawing a Flowchart  Logical sequence  Standard symbols  Direction of flow  top-to-down ◦ To jump to a step further down, go from right ◦ To jump to a step above the current step, go from left Mukesh N.Tekwani20 July 2013 6
  • 7. Guidelines in Drawing a Flowchart  Only one flow line should enter a decision symbol  More than one flow line may leave a symbol  Only one flow line used with Stop symbol  Use connector symbol to breakup a complex flowchart  A flowchart must end with the Stop statement Mukesh N.Tekwani20 July 2013 7
  • 8. Flowchart of ‘while’ loop Mukesh N.Tekwani20 July 2013 8
  • 9. Flowchart of ‘for’ loop Mukesh N.Tekwani20 July 2013 9
  • 10. Flowchart of ‘if’ statement Mukesh N.Tekwani20 July 2013 10
  • 11. Flowchart of ‘if-else’ statement Mukesh N.Tekwani20 July 2013 11
  • 12. Flowchart of ‘switch-case’ statement Mukesh N.Tekwani20 July 2013 12
  • 13. Sum of Two Numbers Mukesh N.Tekwani20 July 2013 13
  • 14. START INPUT X, Y Is X > Y ? BIG = X Yes PRINT BIG BIG = Y STOP No L a r g e r O f T w o N u m b e r s Mukesh N.Tekwani20 July 2013 14
  • 15. F a c t o r i a l o f a N u m b e r Yes START Read N F = 1 M = 1 Is M = N? F = F * M Print F No M = M + 1 STOP Assume: N  no. whose factorial is required Mukesh N.Tekwani20 July 2013 15
  • 17. Flowchart – Find the Largest of Three Numbers Mukesh N.Tekwani20 July 2013 17
  • 18. Limitations of Flowcharts  Complex – for lengthy algorithms, flowchart can be very large  difficult to follow  Time-consuming – drawing complex flowcharts can be very time-consuming  Modification – difficult to modify; redraw entire flowchart  Update – program update is easier; not so for flowcharts  redraw flowchart ! Mukesh N.Tekwani20 July 2013 18
  • 19. Exercise  Design an algorithm and the corresponding flowchart for finding the sum of the numbers 2, 4, 6, 8, …, n  Draw a flowchart to read 100 numbers and then display the sum  Draw a flowchart to display all odd numbers between 0 and 1000  Draw a flowchart to find the sum of first 10 natural numbers and then display the sum Mukesh N.Tekwani20 July 2013 19
  • 20. Suggestions  Algorithm  Flowchart  Program  Use programs in C language to develop questions on Algorithms and Flowcharts Mukesh N.Tekwani20 July 2013 20